可能重复:
Parse Json in php
我正在寻找这个芒果但却找不到......所以这就是问题
如何将https://graph.facebook.com/XXXXXXX中的信息从此处获取到变种中:
{
"id": "XXXXXXX",
"name": "Ricardo Capistran",
"first_name": "Ricardo",
"last_name": "Capistran",
"username": "richycapy",
"gender": "male",
"locale": "es_LA"
}
进入这个变种:
$id, $name, $firstname, $lastname, $username, $gender, $locale
答案 0 :(得分:4)
$data = json_decode($from);
extract($data);