I'm attempting to pull in data from WoWProgress API. I want to parse the data online and just decode them directly while posting them for view. I'm still learning, but I seem to be having issues with this array. Would really need some help.
$json = file_get_contents("http://www.wowprogress.com/guild/eu/twisting-nether/hellenic%20horde/json_rank");
if($json == false)
{
throw new Exception("Failed To load infomation. Check setup options");
}
$result = json_decode($json, true);
echo "<pre>";
foreach ($result["realm_rank"] as $value) {
print_r($value);
}
echo "</pre>";
But all i receive is "Invalid argument supplied for foreach()"
Would really love some help. Thanks in Advance!
Sorry for my english. English is not my native language.
$result["realm_rank"]is an integer value, not an array.