I need some help regarding sorting an array, but not only according to one index. Using uasort() i got it sorted, but that's not enough as i need to create a soccer rankings table
Array
(
[65] => Array
(
[points] => 79
[total_games] => 37
[total_wins] => 23
[total_draws] => 10
[total_defeats] => 4
[total_goals_scored] => 74
[total_goals_against] => 34
[total_goal_dif] => 40
[name] => Inter
)
[255] => Array
(
[points] => 35
[total_games] => 37
[total_wins] => 9
[total_draws] => 8
[total_defeats] => 20
[total_goals_scored] => 36
[total_goals_against] => 51
[total_goal_dif] => -15
[name] => Atalanta
)
[272] => Array
(
[points] => 47
[total_games] => 37
[total_wins] => 12
[total_draws] => 11
[total_defeats] => 14
[total_goals_scored] => 47
[total_goals_against] => 49
[total_goal_dif] => -2
[name] => Bari
)
[307] => Array
(
[points] => 41
[total_games] => 37
[total_wins] => 10
[total_draws] => 11
[total_defeats] => 16
[total_goals_scored] => 41
[total_goals_against] => 54
[total_goal_dif => -13
[name] => Bologna
)
)
)
Ranking should be decided by:
1. points
2. total_goal_dif
2. total_goals_scored