我一直在寻找一种方法来正确解析PHP中JSON对象或类似facebook提要的关联数组:
$request_url ="https://graph.facebook.com/comments/?ids=" . $purl;
$requests = file_get_contents($request_url);
$fb_response = json_decode($requests);
如何在PHP中实现foreach函数来提取每个数据成员的id?
答案 0 :(得分:0)
$fb_response = json_decode($json, true);
foreach($fb_response as $key => $value)
{
// your code....
}