我得到了一个名为$user_alerts
从 SQL 查询生成的多维数组。供您参考,我在这里打印数组:
Array
(
[154472] => Array
(
[3829802] => Array
(
[34438] => 34438
[34442] => 34442
[34429] => 34429
[34443] => 34443
)
[3830078] => Array
(
[34442] => 34442
[34438] => 34438
[34443] => 34443
[34429] => 34429
)
[3829803] => Array
(
[34442] => 34442
[34438] => 34438
[34429] => 34429
[34443] => 34443
)
)
[154554] => Array
(
[3831407] => Array
(
[34438] => 34438
[34429] => 34429
[34443] => 34443
[34442] => 34442
)
[3831408] => Array
(
[34429] => 34429
[34443] => 34443
[34442] => 34442
[34438] => 34438
)
)
[154551] => Array
(
[3831329] => Array
(
[34442] => 34442
[34438] => 34438
[34443] => 34443
[34429] => 34429
)
)
[154477] => Array
(
[3830046] => Array
(
[34442] => 34442
[34429] => 34429
[34438] => 34438
[34443] => 34443
)
[3829564] => Array
(
[34429] => 34429
[34442] => 34442
[34438] => 34438
[34443] => 34443
)
)
[154474] => Array
(
[3829402] => Array
(
[34429] => 34429
[34442] => 34442
[34438] => 34438
[34443] => 34443
)
)
[154473] => Array
(
[3829377] => Array
(
[34442] => 34442
[34429] => 34429
[34438] => 34438
[34443] => 34443
)
)
[154541] => Array
(
[3831211] => Array
(
[34442] => 34442
[34438] => 34438
[34443] => 34443
[34429] => 34429
)
)
[154514] => Array
(
[3830597] => Array
(
[34442] => 34442
[34438] => 34438
[34429] => 34429
[34443] => 34443
)
)
[154513] => Array
(
[3830557] => Array
(
[34442] => 34442
[34438] => 34438
[34429] => 34429
[34443] => 34443
)
)
[154493] => Array
(
[3830072] => Array
(
[34442] => 34442
[34429] => 34429
[34438] => 34438
[34443] => 34443
)
[3829611] => Array
(
[34429] => 34429
)
)
[154491] => Array
(
[3829998] => Array
(
[34429] => 34429
[34443] => 34443
[34442] => 34442
[34438] => 34438
)
)
)
现在我想按升序对内部数组进行排序。需要排序的示例内部数组如下(第一个内部数组元素)。
[3829802] => Array
(
[34438] => 34438
[34442] => 34442
[34429] => 34429
[34443] => 34443
)
实际上我想对所有这样的内部数组进行排序。我尝试了很多技巧,但都没有给我想要的结果。谁能帮我解决这个问题?提前致谢。