Possible Duplicate:
json decode in php
I want to get my id in php, actually without that php sdk files. So i am using this.
$a = file_get_contents('https://graph.facebook.com/100004304380055...');
echo $a['id'];
The contents of the response are
{
"id": "100004304380055",
"name": "Ayush Mishra"
}
But it does not returns my id 100004304380055
. I thing $a
is not an array. I want to know how to make $a
an array and then get my id by $a['id']
. Please provide the code. Any help will be appreciated.