11
08月
2015
26. 解析 JSON 数据
1
2
3
4
5
|
$json_string = '{"id":1,"name":"rolf","country":"russia","office":["google","oracle"]} ' ;
$obj =json_decode( $json_string );
//print the parsed data
echo $obj ->name; //displays rolf
echo $obj ->office[0]; //displays google
|
特殊说明,本文版权归 ning个人博客 所有带原创标签请勿转载,转载请注明出处.