根据数组中的另一个元素选择数组中的元素[关闭]

I've the following array and I would like to select the tier and the rank of the array where queueType is equal to RANKED_FLEX_TT or RANKED_SOLO_5x5 or RANKED_FLEX_SR. How do I do this? I cannot do the following to select the RANKED_SOLO_5x5 as the array is displayed randomly. That is to say sometimes the queueType RANKED_SOLO_5x5 will be in the array [1] or in the array [2] and not always in the array [0]. So I cannot simply do this to find the tier and the rank where queueType is equal to RANKED_SOLO_5x5:

<?php echo $r1[0]["tier"].' '.$r1[0]["rank"]; ?>

Here is an example of the array:

Array
(
    [0] => Array
        (
            [leagueName] => Anivia's Hunters
            [tier] => GOLD
            [queueType] => RANKED_SOLO_5x5
            [rank] => IV
            [playerOrTeamId] => 19302018
            [playerOrTeamName] => AlLeXaNDeR
            [leaguePoints] => 55
            [wins] => 198
            [losses] => 185
            [veteran] => 1
            [inactive] => 
            [freshBlood] => 
            [hotStreak] => 
        )

    [1] => Array
        (
            [leagueName] => Yorick's Warmongers
            [tier] => GOLD
            [queueType] => RANKED_FLEX_TT
            [rank] => V
            [playerOrTeamId] => 19302018
            [playerOrTeamName] => AlLeXaNDeR
            [leaguePoints] => 0
            [wins] => 21
            [losses] => 13
            [veteran] => 
            [inactive] => 
            [freshBlood] => 1
            [hotStreak] => 
        )

    [2] => Array
        (
            [leagueName] => Yorick's Rageborn
            [tier] => SILVER
            [queueType] => RANKED_FLEX_SR
            [rank] => II
            [playerOrTeamId] => 19302018
            [playerOrTeamName] => AlLeXaNDeR
            [leaguePoints] => 100
            [wins] => 61
            [losses] => 56
            [veteran] => 1
            [inactive] => 
            [freshBlood] => 
            [hotStreak] => 
            [miniSeries] => Array
                (
                    [target] => 2
                    [wins] => 1
                    [losses] => 1
                    [progress] => LWN
                )

        )

)

Hope that will help you :

   foreach($array as $subArray){
     foreach($subArray as $key => $value){
       if($key === "queueType" and ($value === "RANKED_FLEX_TT" or $value === "RANKED_SOLO_5x5" or $value === "RANKED_FLEX_SR"))
            echo $item['tier'] . ' ' . $item['rank'] . '<br>'; 
     }  
    }