Most popular web services such as twitter provide data through open APIs. It always knows how to parse various transmission formats of API data, including JSON, XML, etc.
代码如下 | 复制代码 |
$json_string='{"id":1,"name":"foo","email":"foo@foobar.com","interest":["wordpress","php"]} '; $obj=json_decode($json_string); echo $obj->name; //prints foo echo $obj->interest[1]; //prints php |
http://www.bkjia.com/PHPjc/444737.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444737.htmlTechArticleMost popular web services such as twitter provide data through open APIs, it always knows how to parse the API Various data transmission formats, including JSON, XML, etc. Codes such as...
Statement: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