对多维数组按某值排序的php代码,供大家参考。
输出结果:
Array
(
[0] => Array
(
[line_num] => 10
[occur_time] => 2007-11-19 10:25:04+08
)
[1] => Array
(
[line_num] => 9
[occur_time] => 2007-11-19 10:25:04+08
)
[2] => Array
(
[line_num] => 25
[occur_time] => 2007-11-19 10:25:04+08
)
)
<br /><br /><br />Array
(
[2] => Array
(
[line_num] => 25
[occur_time] => 2007-11-19 10:25:04+08
)
[0] => Array
(
[line_num] => 10
[occur_time] => 2007-11-19 10:25:04+08
)
[1] => Array
(
[line_num] => 9
[occur_time] => 2007-11-19 10:25:04+08
)
)
<br /><br /><br />Array
(
[0] => Array
(
[line_num] => 25
[occur_time] => 2007-11-19 10:25:04+08
)
[1] => Array
(
[line_num] => 10
[occur_time] => 2007-11-19 10:25:04+08
)
[2] => Array
(
[line_num] => 9
[occur_time] => 2007-11-19 10:25:04+08
)
)
>>> 更多内容,请查看 php数组排序方法大全 <<<