【发布时间】:2018-11-13 17:37:18
【问题描述】:
我想用分层键对表进行排序,但我不能:(这是一个例子:
array ( '1.1.1' => 'test1', '10.1.1' => 'test2', '2.1.1' => 'test3', 1 => 'test4', 2 => 'test5', 3 => 'test6', '0.1' => 'test7', 0 => 'test8', 10 => 'test9', )
结果必须是:
array ( '0' => 'test8', '0.1' => 'test7', '1' => 'test4', '1.1.1' => 'test1', '2' => 'test5', '2.1.1' => 'test3', '3' => 'test6', '10' => 'test9', '10.1.1' => 'test2')
非常感谢!
【问题讨论】:
-
请向我们展示您的尝试。
-
问题出在哪里?
-
请刷新,我修改了我的帖子
标签: php