如何对以下数组进行排序? array_multisort似乎没有完成这项工作。
Array
(
[2009] => Array
(
[name] => 2009
[20100923WO2010107543A2] => 20100923WO2010107543A2
)
[2006] => Array
(
[name] => 2006
[20080403US20080078500A1] => 20080403US20080078500A1
)
[1984] => Array
(
[name] => 1984
)
)
排序表格
Array
(
[1984] => Array
(
[name] => 1984
)
[2006] => Array
(
[name] => 2006
[20080403US20080078500A1] => 20080403US20080078500A1
)
[2009] => Array
(
[name] => 2009
[20100923WO2010107543A2] => 20100923WO2010107543A2
)
)
答案 0 :(得分:1)
您似乎正在尝试根据键对数组进行排序。使用ksort()
。