Hi,
I have a 2-dimensionnal array containing informations about some sport league results:
__________|Played|Points|Goal Av.|
Arsenal | 27 | 50 | 20 |
Liverpool | 26 | 45 | 19 |
Manch. U. | 27 | 63 | 42 |
Sunderland| 27 | 44 | 7 |
I can access each "cell" of my array by using the following syntax:
$array[$team_name]["Played"] = ...
Now, I want to be able to sort the teams by "Points" (primary criteria) and "Goal Av." (secondary criteria), to get something like:
rank| Team |Played|Points|Goal Av.|
1 |Manch. U. | 27 | 63 | 42 |
2 |Arsenal | 27 | 50 | 20 |
3 |Liverpool | 26 | 45 | 19 |
4 |Sunderland| 27 | 44 | 7 |
How can this be done ? (array_multisort ? How ?)
Thank you in advance !