我有一个像下面提到的数组
Array
(
[6] => Array
(
[name] => Extras
[total_products] => 0
[total_sales] => 0
[total_affiliation] => 0
)
[5] => Array
(
[name] => Office Products
[total_products] => 7
[total_sales] => 17
[total_affiliation] => 8
)
[1] => Array
(
[name] => Hardware Parts
[total_products] => 6
[total_sales] => 0
[total_affiliation] => 0
)
)
目前,顺序为:Extras、Office Products、Hardware Parts
我希望按照内部数组的 total_sales 降序排列来对主数组进行排序
因此,顺序将为:Office Products、Extras、Hardware Parts
有什么帮助吗?