title: PHP Loop through JSON
body: <p>Sorry about another one of these.</p>
  
  <p>The json comes back in this format:</p>
  
  <pre><code>{
     "data":{
        "internalName":"hotshotgg",
        "name":"HotshotGG",
        "acctId":434582,
        "profileIconId":531,
        "revisionDate":"\/Date(1357002079809)\/",
        "summonerLevel":30,
        "summonerId":407750
     },
     "success":true
  }
  </code></pre>
  
  <p>Also seen here: <a href="http://elophant.com/developers/docs/summoner" rel="nofollow">http://elophant.com/developers/docs/summoner</a></p>
  
  <p>The data comes back correctly:</p>
  
  <pre><code>Array ( 
      [data] =&gt; Array ( 
          [internalName] =&gt; nemonorm 
          [name] =&gt; nemonorm 
          [acctId] =&gt; 28685607 
          [profileIconId] =&gt; 544 
          [revisionDate] =&gt; /Date(1361354064000)/ 
          [summonerLevel] =&gt; 30 
          [summonerId] =&gt; 24286314 
      ) 
      [success] =&gt; 1 
  )
  </code></pre>
  
  <p>I can't seem to loop through and print out the information I want:</p>
  
  <pre><code>$decode= json_decode($url, true);
  
  foreach($decode['data'] as $key =&gt; $value) {
      echo  $value['name'] . " &lt;br /&gt;";
  }
  </code></pre>
  
  <p>Pretty sure it's something obvious... But I can't see it.</p>