好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

php解析JSON 数据 - php高级应用

php解析JSON 数据

大多数流行的 Web 服务如 twitter 通过开放 API 来提供数据一样,它总是能够知道如何解析 API 数据的各种传送格式,包括 JSON,XML 等等,代码如下:

$json_string = '{"id":1,"name":"foo","email":"foo@foobar.com","interest":["wordpress","php"]} ' ;   $obj =json_decode( $json_string );   echo   $obj ->name;  //开源代码phpfensi.com   //prints foo echo $obj->interest[1]; //prints php

查看更多关于php解析JSON 数据 - php高级应用的详细内容...

  阅读:37次