title: Show Data from Json Result
body: <p>I have a curl request, I'm trying to get to display the  'name' from the JSON result in PHP but can't find anything about it all requires Jquery and AJAX. </p>
  
  <pre><code>&lt;?php
      $url="https://euw1.api.riotgames.com/lol/summoner/v3/summoners/by-name/alphamonkey95?api_key="myapikey";
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_URL,$url);
      $result=curl_exec($ch);
      curl_close($ch);
      var_dump(json_decode($result, true));
  ?&gt;
  
  &lt;html&gt;
      &lt;body&gt;
      &lt;div&gt;
      &lt;p&gt;Display name here&lt;/p&gt;
  I'm guessing the echo['name'] Well tried that but it didnt work. 
      &lt;/div&gt;
      &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>Results in JSON which is displayed on the page. I only want to display certain results. </p>
  
  <pre><code>array(6) { ["id"]=&gt; int(85169216) ["accountId"]=&gt; int(226919821) ["name"]=&gt; string(13) "AlphaMonkey95" ["profileIconId"]=&gt; int(3233) ["revisionDate"]=&gt; int(1522708809000) ["summonerLevel"]=&gt; int(73) }
  </code></pre>