0

我需要按字母顺序对数组进行排序,所以结果应该是这样的:

Inn Zoo
Leo Ann
Leo Zes
Sun Yog

我查看了所有这些示例,但不适用于下面的数组(较早的问题):


Array
(
    [1] => Array
        (
            [Inn] => Array
                (
                    [Zoo] => Inn Zoo
                )

        )

    [2] => Array
        (
            [Sun] => Array
                (
                    [Yog] => Sun Yog
                )

        )

    [3] => Array
        (
            [Leo] => Array
                (
                    [Zes] => Leo Zes
                )

        )
    [4] => Array
        (
            [Leo] => Array
                (
                    [Ann] => Leo Ann
                )

        )
)
4

1 回答 1

-1
array
(
    [0] => Inn|Zoo|Inn Zoo
    [1] => Sunn|Yog|Sun Yog
    [2] => Leo|Zes|Leo Ann
    [3] => Leo|Ann|Leo Zes
)

asort($list);

array
(
    [0] => Inn|Zoo|Inn Zoo
    [3] => Leo|Ann|Leo Zes
    [2] => Leo|Zes|Leo Ann
    [1] => Sunn|Yog|Sun Yog
)
于 2013-03-13T17:56:26.540 回答