I’ve some numbers which come from a query and that I have to represent using the json_encode function.
Everything work but the output looks like this
{ "label": "man", "data":[["0","1.13"], ["1","1.38"], ["2","1.87"], ["3","1.12"], ["4","1.28"]]}
so I think that the problem is that all the numbers are stored as string.
Is there a function to convert all the elements in number?
You might want to add JSON_NUMERIC_CHECK to your json_encode function: