title: Splitting multiple elements in an array
body: <p>I've hit an issue I didn't think of. It's okay when I've got an array of data with only one of each element name say [name], [date], [id] because I just just put it into a variable for example $variable['name'] but I'm a bit lost when it comes to big arrays where say I've got 3 seasons worth of data (so season1, season2, season3) in one array so there is [name] 3 times, or [score] 3 times because there's 1 for each season..</p>
  
  <p>Live example to help: <a href="http://vaughanslater.com/amphios" rel="nofollow noreferrer">http://vaughanslater.com/amphios</a></p>
  
  <pre><code>    &lt;?php
          $summoner_name = 'amphios';
          $summoner_id = 21554735;
  
          $profile = new riotapi('euw');
  
          $summonername = $profile-&gt;getSummonerByName($summoner_name);
          $json = $summonername;
  
          // turns raw data into array
          $test = json_decode($json, true);
  
          // raw data
          //var_dump(json_decode($json, true));
  
          echo 
          'Summoner name: ' . $test['name'] . '&lt;br /&gt;' .
          'Summoner ID: ' . $test['id'] . '&lt;br /&gt;' .
          'Profile icon ID: ' . $test['profileIconId'] . '&lt;br /&gt;' .
          'Summoner level: ' . $test['summonerLevel'] . '&lt;br /&gt;';
  
          echo '&lt;br /&gt;';
          echo '&lt;br /&gt;';
  
          $summonerstats = $profile-&gt;getStats($summoner_id);
          $json2 = $summonerstats;
  
          print_r($summonerstats);
  
          // turn raw data into array
          $test2 = json_decode($json2, true);
  
          // raw data
          var_dump(json_decode($json2, true));
  
          echo $test2['totalChampionKills'][0];
  
          //$summonername = $profile-&gt;getSummonerByName($summoner_name);
          //print_r($summonername);
  
          //$summonerstats = $profile-&gt;getStats($summoner_id, 'ranked');
          //print_r($summonerstats);
  
          //$getsummoner = $profile-&gt;getSummoner($summoner_id, 'name');
          //print_r($getsummoner);
  
          //$getleague = $profile-&gt;getLeague($summoner_id);
          //print_r($getleague);
      ?&gt;
  </code></pre>
  
  <p>So where the "echo" starts that's fine and works how I want, it turns the JSON data into a php array where I can place it into a variable. Now (further down) I want to Do the same but there's 3 sets of the same data (different results, same element names) in one array. How will I go about splitting this?</p>