I want to modify a JSON data format using PHP.
I have an array like this:
Array (
[0] => stdClass Object (
[0] => Thu Apr 30 12:25:12 +0000 2015 )
[1] => stdClass Object (
[0] => Wed Apr 15 21:57:05 +0000 2015 )
)
I have tried the json_encode($data); but it is coming like this:
[{"0":"Thu Apr 30 12:25:12 +0000 2015"},{"0":"Wed Apr 15 21:57:05 +0000 2015"}]
But I want this format:
["Thu Apr 30 12:25:12 +0000 2015","Wed Apr 15 21:57:05 +0000 2015"]
what should i do ?