json_decode in array php

# json_decode in array php
As per the documentation, you need to specify if you want an associative array instead of an object from json_decode, this would be the code:
json_decode($jsondata, true);
$jsondata = file_get_contents($json_string);
$obj = json_decode($jsondata,true);
echo “<pre>”;

Leave a Reply

Your email address will not be published. Required fields are marked *