PHP解析json 并获取元素的值
<?php$json=
'{
"item1": {"item11":{"n":"zzzyk","m":"l.com"},"易做图":"男","age":"40"},
"item2": {"item21":"ling","易做图":"女","age":"24"} }';
$J=json_decode($json);
print_r($J);
print_r("</br>");
echo "测试访问对象内元素</br>";
print_r($J->item1->item11->n."</br>");
print_r($J->item1->易做图."</br>");
//注意不是标准的json
print_r($J->item2->age."</br>");
?>