我在排序一个看起来像这样的简单数组时遇到了一些困难:
Array
(
[3] => Array
(
[0] => EU West (Ireland)
[1] => eu-west-1
)
[7] => Array
(
[0] => South America (Sao paulo)
[1] => sa-east-1
)
[0] => Array
(
[0] => US East (Virginia)
[1] => us-east-1
)
[4] => Array
(
[0] => Asia Pasific (Tokyo)
[1] => ap-northeast-1
)
[2] => Array
(
[0] => US West (Oregon)
[1] => us-west-2
)
[1] => Array
(
[0] => US West (N. California)
[1] => us-west-1
)
[5] => Array
(
[0] => Asia Pasific (Singapore)
[1] => ap-southeast-1
)
[6] => Array
(
[0] => Asia Pasific (Sydney)
[1] => ap-southeast-2
)
)
我想在索引上对这个数组进行排序。我用过ksort()
,但它不起作用,它留下一个输出 1。