Array
(
[1] => Array
(
[Высшая] => 0
[Вторая] => 0
[Первая] => 0
)
[2] => Array
(
[Вторая] => 0
[Первая] => 0
[Высшая] => 0
)
[3] => Array
(
[Высшая] => 0
[Первая] => 0
[Вторая] => 0
)
[4] => Array
(
[Высшая] => 0
[Первая] => 0
[Вторая] => 0
)
[5] => Array
(
[Вторая] => 0
[Высшая] => 0
[Первая] => 0
)
)
$league_sort_order = array('Высшая', 'Первая', 'Вторая');
foreach ($league_sort_order as $league_sort_order_key => $league_sort_order_value) {
foreach ($tournaments_array as $tour_number_key => $tour_number_value) {
foreach ($tour_number_value as $league_key => $league_value) {
if ($league_value['players']) {
if ($league_sort_order_value == $league_key) {
foreach ($league_value['players'] as $player) {
usort($league_value['players'], "cmp_total");
$tournaments_array_sorted_by_league[$tour_number_key][$league_sort_order_value] = $league_value;
//$tournaments_array[$tour_number_key][$league_sort_order_value] = $league_value;
}
}
}
}
}
}