title: php picasa api json decode problem
body: <p>Here is my code to json decode picasa api results, but it always <code>Warning: Invalid argument supplied for foreach()</code>, Where is the problem? Thanks. </p>
  
  <pre><code>&lt;?php
  header('Content-type:text/html; charset=utf-8');
  $url="http://picasaweb.google.com/data/feed/base/all?alt=json&amp;kind=photo&amp;access=public&amp;filter=1&amp;q=usa&amp;imgor=landscape&amp;max-results=50&amp;hl=en";
  $json = file_get_contents($url);
  $data = json_decode($body, true);
  foreach ($data['feed']['entry'] as $result){         
  echo html_entity_decode($result-&gt;content-&gt;src, ENT_QUOTES, 'UTF-8');
  echo html_entity_decode($result['updated']['$t'], ENT_QUOTES, 'UTF-8');
  }
  ?&gt;
  </code></pre>
  
  <p><a href="http://www.nomorepasting.com/getpaste.php?pasteid=36569" rel="nofollow">json tree here</a></p>