我正在尝试按数组键对多维数组进行排序。我查看了 array_multisort, array_multisort($result['EVENT'], SORT_NUMERIC, SORT_DESC); 但它仅对事件数组值进行排序
我需要按事件值(DESC 顺序)排序,
我的数组如下所示: Array ( [POLICY] => Array ( [0] => 278395 [1] => 278395 ) [EVENT] => Array ( [0] => 1 [1] => 2 )
[EVENT_TYPE] => Array
(
[0] => INITIAL POLICY
[1] => POLICY CORRECTION
)
[DATE] => Array
(
[0] => 03-JAN-20
[1] => 18-JUN-20
)
)
预期输出: Array ( [POLICY] => Array ( [0] => 278395 [1] => 278395 ) [EVENT] => Array ( [0] => 2 [1] => 1 )
[EVENT_TYPE] => Array
(
[0] => POLICY CORRECTION
[1] => INITIAL POLICY
)
[DATE] => Array
(
[0] => 18-JUN-20
[1] => 03-JAN-20
)
)
吃鸡游戏