I'm using PHP v5.6.
As i read that php json_encode function is automatically converting int to string. But not in my case. Json_encode is still return it to int not string.
Like example:
json_encode(['code' => 200, 'results' => [id=> 1]]);
my expected results is all become a string. but what i get is
{"code":200,"results":{"id": 1}}
Expected output:
{"code":"200","results":{"id": "1"}}
How can i change all the result become string without using "" for every value?.
NB: results array is based on query.