如何按值并按降序对下面的数组进行排序?
Array
(
[BASE_PRICE] => Array
(
[APPLE] => 0.52
[ORANGE] => 0.91
[BANANA] => 0.69
[LIME] => 0.25
)
[MARKUP] => Array
(
[APPLE] => 0.20
[ORANGE] => 0.12
[BANANA] => 0.25
[LIME] => 0.25
)
)
最终结果需要如下所示。
Array
(
[BASE_PRICE] => Array
(
[ORANGE] => 0.91
[BANANA] => 0.69
[APPLE] => 0.52
[LIME] => 0.25
)
[MARKUP] => Array
(
[BANANA] => 0.25
[LIME] => 0.25
[APPLE] => 0.20
[ORANGE] => 0.12
)
)
我可以使用该arsort()函数或类似函数对数组中的值进行排序吗?
aluckdog