Observe this little script:
$array = array(\'stuff\' => \'things\'); print_r($array); //prints - Array ( [stuff] => things ) $arrayEncoded = json_encod
Although, as mentioned, you could add a second parameter here to indicate you want an array returned:
$array = json_decode($json, true);
Many people might prefer to cast the results instead:
$array = (array)json_decode($json);
It might be more clear to read.