The json_decode() function decodes the value passed as a string (JSON) into the data in correct format (in this case: an array).....<p>That's incorrect. json_decode with no second argument creates a standard object not an array. If you want an array then pass true as the second argument