如何根据数组中的值进行排序

赵立成 发布于 2015/10/22 10:18
阅读 76
收藏 0
$arr = array(    
    array(
array(
    "title" => '11',
    "zimu" => 'Z'
    ),
array(
    "title" => '22',
    "zimu" => 'Z'
    ),

)
    array(
    "title" => '33',
    "zimu" => 'B'
    ),
    array(
    "title" => '444',
    "zimu" => 'A'
    )
);


如何根据这个zimu进行排序啊

出来的是结果是这样的  如下:

Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [title] => 444
                    [zimu] => A
                )
 
        )
  [1] => Array
        (
            [0] => Array
                (
                    [title] => 33
                    [zimu] => B
                )
 
        )
    [2] => Array
        (
            [0] => Array
                (
                    [title] =>11
                    [zimu] => Z
                )
 
            [1] => Array
                (
                    [title] => 22
                    [zimu] => Z
                )
 
        )
 
)




加载中
返回顶部
顶部