title: Echoing JSON results (RIOT API)
body: <p>I am still an amateur on this but I am learning really fast. I have a php index which contains a API request to RIOT's API (League of Legends). I am trying to filter results, but when I try that it gives me a blank page.</p>
  
  <p>This is the code I am trying to use in order to echo json results:</p>
  
  <pre><code>&lt;html&gt;
   &lt;head&gt;
    &lt;title&gt;RIOT API SBOX&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
   &lt;?php
  
  $json = json_decode(file_get_contents('https://euw.api.pvp.net/api/lol/euw/v2.5/league/by-summoner/31827832?api_key=mykey'), true);
  
  //print_r($json);
  
  echo $json[0]['rank'];
  echo $json[0]['tier'];
  echo $json[0]['wins'];
  
   ?&gt; 
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have a live preview on this website: <a href="http://20ff.net/" rel="nofollow">http://20ff.net/</a> (this link uses the code shown above)
  This is the 2nd link <a href="http://20ff.net/index2.php" rel="nofollow">http://20ff.net/index2.php</a> which has <code>print_r($json);</code> enabled and all the other echoes disabled (with exact same code). In the 2nd link you can see the items on which you can create a filter. I would like to know how to get information out of this arrays and echo them. Thank you for your time helping a rookie out.</p>