PHP JSON 数据解析代码_PHP教程

WBOY
Release: 2016-07-21 15:38:09
Original
993 people have browsed it

使用此代码可以顺利解析人人连接网站POST获取的数据。

复制代码代码如下:

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

这里是摘自脚本之家之前发布的文章。更多的技巧可以参考。
收集的二十一个实用便利的PHP函数代码

www.bkjia.com true http://www.bkjia.com/PHPjc/321851.html TechArticle 使用此代码可以顺利解析人人连接网站POST获取的数据。 复制代码 代码如下: $json_string='{"id":1,"name":"jb51","email":"admin@jb51.net","interest":["wordpr...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!