我正在尝试对数组的内容进行排序,然后将其输入到 HTML 表中。该数组需要根据进球数进行排序,如果两支球队拥有最多球员的球队,则需要将其放置在更高的位置。这是数组的示例:
Array
(
[0] => Array
(
[id] => 1
[team] => Manchester United
[goals] => 210
[country] => england
[players] => 10
)
[1] => Array
(
[id] => 2
[team] => Manchester City
[goals] => 108
[country] => england
[players] => 12
)
[2] => Array
(
[id] => 3
[team] => Liverpool
[goals] => 108
[country] => england
[players] => 15
)
)
我从来没有在 PHP 中进行过排序,而且我对数组只有一些经验,它们不是这样嵌套的。