使用php进行echonest查询json解析



我正在尝试解析这个echonest请求:

{"response": {"status": {"version": "4.2", "code": 0, "message": "Success"}, "start": 0, "total": 1, "biographies": [{"text": "Pianist, composer and leader (8 September 1893 - 25 January 1947) Complete name: Adolfo Carabelli", "site": "last.fm", "url": "http://www.last.fm/music/Adolfo+Carabelli/+wiki", "license": {"type": "cc-by-sa", "url": "http://creativecommons.org/licenses/by-sa/3.0/", "version": "3.0"}}]}}

我的代码:

$biographie = $jbios->response->biographies[1]->text;
echo "<b> Biographie: </b>". $biographie."<br>";

怎么了?提前感谢,

你做过json_decode吗?请尝试:

$array = json_decode($json,true)

最新更新