If your array is structured like this:
Array
(
[0] => Array
(
[Team] => Team_A
[Points] => 4
[GoalDifference] => 2
)
[1] => Array
(
[Team] => Team_B
[Points] => 8
[GoalDifference] => 4
)
[2] => Array
(
[Team] => Team_C
[Points] => 4
[GoalDifference] => 4
)
)
(which is what I gathered from reading your first post.)
Then after running this code:
foreach ($teams as $key => $val) {
$tmp_pts[$key] = $val['Points'];
$tmp_diff[$key] = $val['GoalDifference'];
}
array_multisort($tmp_pts, SORT_DESC, $tmp_diff, SORT_DESC, $teams);
print_r($teams);
You will see this:
Array
(
[0] => Array
(
[Team] => Team_B
[Points] => 8
[GoalDifference] => 4
)
[1] => Array
(
[Team] => Team_C
[Points] => 4
[GoalDifference] => 4
)
[2] => Array
(
[Team] => Team_A
[Points] => 4
[GoalDifference] => 2
)
)
The array is sorted primarily on "Team" and secondarily on "GoalDifference".
If it doesn't work for you, after making the necessary variable name changes (including capitalization), then you'll need to post an accurate description of your array structure, and/or an example of it.