当前位置:Gxlcms > PHP教程 > 二维数组排序这个要如何做

二维数组排序这个要如何做

时间:2021-07-01 10:21:17 帮助过:36人阅读

二维数组排序这个要怎么做?
Array
(
[0] => Array
(
[userid] => 123707
[username] => qycntest
[realname] => 企业开发
[sex] => 3
[departname] =>
)

[1] => Array
(
[userid] => 123725
[username] => devtest-23
[realname] => nn
[sex] => 1
[departname] => 17c
[creator] => 1
)

[2] => Array
(
[userid] => 123726
[username] => devtest-24
[realname] => oo
[sex] => 1
[departname] => 测试部
[isManager] => 1
)

[3] => Array
(
[userid] => 123728
[username] => devtest-26
[realname] => qq
[sex] => 1
[departname] => 测试部
[isManager] => 1
)

[4] => Array
(
[userid] => 123732
[username] => devtest-30
[realname] => uu
[sex] => 1
[departname] => 测试部
)

)
我要把有isCreator的项的排在最前面,其次是isManager=1排在后面,最后就是普通用户,请教下大家! 谢谢
------解决方案--------------------

人气教程排行