for($c=0; $c<=2; $c++) echo $a['box'][$c][0];

解决方案 »

  1.   

    我的意思是把上面那个数组变成这样子打印出来:Array
    (
        [box] => Array
            (
                [0] => Array
                    (
                        [0] => photo
                    )
                [1] => Array
                    (
                        [0] => 2008
                    )
                [2] => Array
                    (
                        [0] => zone
                    )
                [3] => Array
                    (
                        [0] => calendar
                    )
                [4] => Array
                    (
                        [0] => last_post
                    )
                [5] => Array
                    (
                        [0] => last_comment
                    )
                [6] => Array
                    (
                        [0] => last_gbook
                    )
                [7] => Array
                    (
                        [0] => myalbum
                    )
                [8] => Array
                    (
                        [0] => diy_bm
                    )
            )
    )
      

  2.   

    $a[box][0][0] = "photo";
    $a[box][2][0] = "zone";
    $a[box][3][0] = "calendar";
    $a[box][4][0] = "last_post";
    $a[box][5][0] = "last_comment";
    $a[box][6][0] = "last_gbook";
    $a[box][7][0] = "myalbum";
    $a[box][8][0] = "diy_bm";
    $a[box][1][0] = "my2008";
    function cmp($a, $b)
    {
        if ($a == $b) {
            return 0;
        }
        return ($a < $b) ? -1 : 1;
    }
    uksort($a[box],"cmp");
    print_r($a[box]);
      

  3.   

    建议楼主看看 array_multisort  函数。
      

  4.   

    直接用ksort($a[box])进行排序就好了。