所以我试图从 json_decode 回显数组数据,我尝试了几种方法,但似乎没有任何效果,如何正确执行此操作?
这是我的代码:
<?php
$jsonstring = file_get_contents('example.com/json'); //get the string
$decoded = json_decode($jsonstring, true); //decode the string
echo $decoded[roadDamage][0][place]; //echo array content
?>
回声部分根本不起作用,它什么都没有回声......
我的解码数组看起来像这样,我对 roadDamage 数组和地点、时间的值很感兴趣