php sort array by $array[*][sum of this]
问题 I have a multidimensional array which stores information about players in a game. It stores an array for each player, and each player is an array of information. One of the values in each player is an array of scores. I want to output my data to a table in order of highest total score to lowest. At the moment, the output is in no particular order. The only way I know of to get the total score is array_sum($allplayers[0][2]) or similar. How can I sort the array $allplayers so that when I loop