PHP解析json数据(历史恢复文章)
该文章恢复至 2021年01月19日 的文章
json数据:$json = '{"state": "1","test": "2"}';
json解析:$de_json = json_decode(【json数据】,true);
输出json内的数据:echo $de_json['state'];//输出结果为 1
解析例子:
$json = '{"state": "1","test": "2"}';
$de_json = json_decode($json,true);
echo $de_json['state']; //输出state内的数据,输出结果为1
echo $de_json['test']; //输出test内的数据,输出结果为2
阅读剩余
版权声明:
作者:tiantian
链接:https://blog.cv0.cn/126/
文章版权归作者所有,未经允许请勿转载。
THE END