-1
I have a php/json file in which the numbers coming from an sql query result in double quotes:
"relatorio": [
"3",
"1",
"2"
]
I’d like to leave them without the double quotes on the numbers. I’m using a sql query in php to display the results.
$check = $pdo->prepare("SELECT count(*) as 'total' FROM rating WHERE rt_rating IS NOT NULL group by rt_rating");
$check->execute();
while ( $lista = $check->fetch(\PDO::FETCH_OBJ) )
{
$out['relatorio'][] = $lista->total;
}
What I would like result to be similar to that:
"relatorio3": [4,2,1]
It worked. Thank you very much :)
– Leno Sousa