I have the following code:
$Json = array();
foreach ($Dados as $ln){
$Json[label] = $ln['NOME'];
$Json[value] = $ln['EMAIL'];
}
echo json_encode($Json);
With this I have the following return:
{"label":"xxxxxxxxx","value":"xxxxxxxxxxx"}
I would like to bring all returns from the bank and also remove the quotes from both the label and the value.
Expected result:
[
{label:"xxxxxxxxx",value:"xxxxxxxxxxx"}
{label:"yyyyyyyyy",value:"yyyyyyyyyyy"}
{label:"zzzzzzzzz",value:"zzzzzzzzzzz"}
]