Array
(
[1] => a
[2] => b
[3] => c
[0] => d
[4] => e
)
以下为目标数组
Array
(
[0] => d
[1] => a
[2] => b
[3] => c
[4] => e
)
解决办法:
ksort($arr);
怎样把数组中的元素按键名大小排列,布布扣,bubuko.com
原文地址:http://my.oschina.net/guomingliang/blog/300225