I broke the code up into as many steps as possible to try to figure out what it was doing.
$addsData='http://football.myfantasyleague.com/2013/exportTYPE=topAdds&L=&W=&JSON=1';
$addsData = json_encode(file_get_contents($addsData));
$addersData = file_put_contents("addsData.txt", $addsData);
$getAdds = file_get_contents("addsData.txt");
$topAddsData = json_decode($getAdds, true);
echo "<pre>";
print_r($topAddsData);
echo "</pre>";
And Here is the result that I am getting...
"version":"1.0","topAdds":{"week":"1","player":[{"percent":"25.95","id":"9705"},{"percent":"23.92","id":"10372"},{"percent":"23.72","id":"11440"},{"percent":"23.43","id":"11259"},{"percent":"20.29","id":"9079"},{"percent":"17.06","id":"10048"},{"percent":"16.93","id":"11227"},{"percent":"14.66","id":"10500"},{"percent":"14.10","id":"9964"},{"percent":"13.90","id":"10862"},{"percent":"13.80","id":"9834"},{"percent":"13.55","id":"10355"},{"percent":"13.29","id":"10961"},{"percent":"13.27","id":"9437"},{"percent":"11.87","id":"9912"},
}
My understanding from reading the manual is that it should be an Associative array because I am passing in the true parameter. What am I missing here?