首页 > 编程 > PHP > 正文

PHP JSON 数据解析代码

2019-11-22 01:09:50
字体:
来源:转载
供稿:网友
使用此代码可以顺利解析人人连接网站POST获取的数据。
复制代码 代码如下:

$json_string='{"id":1,"name":"jb51","email":"admin@VeVB.COm","interest":["wordpress","php"]} ';
$obj=json_decode($json_string);
echo $obj->name; //prints foo
echo $obj->interest[1]; //prints php

这里是摘自武林网之前发布的文章。更多的技巧可以参考。
收集的二十一个实用便利的PHP函数代码
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表