0

JSON:

{
   "info":true,
   "test1":{
      "test2":{
         "test3":0,
         "test4":1
      }
   }
}

PHP code:

$json_url = "url";
$json = file_get_contents($json_url);
$data = json_decode($json,true);

echo $data['test1']["test2"]["test3"];  
echo $data['test1'][0]["test2"]["test3"];   
echo $data['test1']["test2"][0]["test3"];   
echo $data['test1']["test2"][0]["test3"][0];    

Nothing is displayed on the page, no errors, etc. I also tried to do foreach but it didn't change anything.

0 Answers0