Here's the deal... I'm running a bunch of URL's through a foreach loop. Each URL will pass through fil_get_contents() but some will return 500 errors (expected), I want to skip/ignore any 500 errors, that are returned, but still pull the data for the valid responses. I have this setup, but still getting errors for undefined index on those 500 responses.
foreach($a['response']['groups']['users']['name'] as $key => $values)
{
$id = $values['uname']['id'];
$url = "http://thisurlimusing.com"."$id";
$context = stream_context_create(array('http' => array('ignore_errors' => true),));
$string = file_get_contents($url,false,$context);
$array = json_decode($string, true);
print_r($array['specific']);
}