I am trying to decode a JSON string into an array but i get the following error.
Fatal error: Cannot use object of type stdClass as array in C:\\w
json_decode($data, true); // Returns data in array format json_decode($data); // Returns collections
So, If want an array than you can pass the second argument as 'true' in json_decode function.
json_decode