所以,我在PHP上的数组上有这个结构,我想知道如何对值进行排序:
Array
(
[0] => Array
(
[0] => One
[1] => Ultra
[2] => Plus
)
[1] => Array
(
[0] => Value
[1] => Another value
)
[2] => Array
(
[0] => buzz
[1] => fuzz
[2] => bla
[3] => bla
[4] => blabla
)
)
我尝试使用array_multisort
,但它说:Message: array_multisort(): Array sizes are inconsistent
我希望每个子数组按字母顺序排序。实际代码:
array_multisort($array[0], SORT_ASC, SORT_STRING, $array[1],
SORT_ASC, SORT_STRING, $array[2],
SORT_ASC, SORT_STRING);