Tag archives for PHP json object to array
PHP–JSON object to array
The trick was to pass in ‘true’ to the This returns an associative array instead of an object.$json_string = ''; $jsondata = file_get_contents($json_string); $obj = json_decode($jsondata,true); echo ‘<pre>’; print_r($obj);