I have the following array:
Array
(
[0] => Team Object
(
[id] => 0
[name] => Redgate
[played] => 4
[won] => 2
[drawn] => 1
[lost] => 1
[points] => 7
[goals_for] => 12
[goals_against] => 8
[goal_difference] => 4
)
[1] => Team Object
(
[id] => 1
[name] => Formby
[played] => 4
[won] => 1
[drawn] => 1
[lost] => 2
[points] => 4
[goals_for] => 10
[goals_against] => 11
[goal_difference] => -1
)
[2] => Team Object
(
[id] => 2
[name] => Southport
[played] => 4
[won] => 1
[drawn] => 2
[lost] => 1
[points] => 5
[goals_for] => 12
[goals_against] => 15
[goal_difference] => -3
)
)
I need to order each of the elements of the array in the following way:
points (big->small)
if the number of points is the same between two elements then:
goal_difference (big->small)
if the goal difference is the same:
goals_for (big->small)
if the number of goals for is the same:
name (Alphabetically).
Does anyone know how best to go about doing this?
Ta,
Ben