I have an array that looks like this :
[0] => Array
(
[ID] => 1
[total_1] => 200
[total_2] => 10
[total_3] => 420
[name] => testname1
)
[1] => Array
(
[ID] => 2
[total_1] => 900
[total_2] => 30
[total_3] => 40
[name] => testname1
)
[2] => Array
(
[ID] => 3
[total_1] => 900
[total_2] => 40
[total_3] => 90
[name] => testname1
)
I need to sort it by the sum of total_1, total_2 and total_3. So, in this example, if I were to output just the ID key in the correct descending sort order, it would be :
3, 2, 1
Can anyone please tell me how to do this in PHP ?