Home >Backend Development >PHP Tutorial >二维数组排序这个要如何做

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

WBOY
WBOYOriginal
2016-06-13 11:10:08799browse

二维数组排序这个要怎么做?
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排在后面,最后就是普通用户,请教下大家! 谢谢
------解决方案--------------------

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn