I have tried multiple solutions but none seems to work for me Basically I am pulling facebook page likes and it puts them in an array and then i want to display a specific value from that array but i am not able to do that no matter what, below is my code:
$url = 'https://graph.facebook.com/22992739859?fields=name,fan_count&access_token=my access token';
$t = file_get_contents($url);
preg_match_all('!\d+!', $t, $matches);
Array (  => 158060  => 22992739859 )
$matches fetches the 0th index of the $matches array which also happens to be an array. You can just gran the 0th index of that as well.
$result = $matches; print_r($result);