For the League of Legends API, I'm trying to get the players RankedSolo5x5. Successfully, I get that information for a player. But the array number will change depending on what players have & haven't played. So let's say RankedPremade5x5 has never been played. It won't appear in the array, thus making RankedSolo5x5 #4 instead of #5.
So instead of using this, which will only work if a user has that as the 5th class..
$soloSummonerRanked[5]->wins;
I'm trying to get the array by matching the value so that all these others arrays will not get in the way of what I'm trying to accomplish. Getting the number of wins in that specific game type. How can I do this?
[4] => stdClass Object
(
[playerStatSummaryType] => RankedPremade5x5
[wins] => 0
[losses] => 0
[modifyDate] => 1347501723000
[aggregatedStats] => stdClass Object
(
)
)
[5] => stdClass Object
(
[playerStatSummaryType] => RankedSolo5x5
[wins] => 203
[losses] => 135
[modifyDate] => 1401793988000
[aggregatedStats] => stdClass Object
(
[totalChampionKills] => 3092
[totalMinionKills] => 66904
[totalTurretsKilled] => 649
[totalNeutralMinionsKilled] => 8315
[totalAssists] => 2471
)
)