title: PHP Undefined Index When Decoding From Json
body: <p>I am trying to Json decode something and get the value I want.
  But I get PHP undefined index error.
  This is my code.</p>
  
  <pre><code>&lt;?php
  $json = '[{"totalGamesPlayed":25,"championId":0}]';
  $data = json_decode($json,true); 
  
  $games = $data['totalGamesPlayed'];
  echo $games;
  ?&gt;
  </code></pre>
  
  <p>The problem is the "[" "]" are messing with my code...
  I am using an API to get some values.
  What I get is this : <a href="http://pastebin.com/XrqkAbJf" rel="noreferrer">http://pastebin.com/XrqkAbJf</a>
  I need the totalGamesPlayed,the champion ID's except zero (82,106 and 24)
  and the TOTAL_SESSIONS_WON and TOTAL_SESSIONS_LOST for these ID's...
  For a start, let's find out how can I bypass the "[" and "]" symbols,and then things may be easier..
  Thank you in advance!</p>