我有像这样的多维数组:
Array
(
[name] => Array
(
[0] => South Africa
[1] => Australia
[2] => Egypt
)
[img] => Array
(
[0] => sa-flag.jpg
[2] => au-flag.jpg
[1] => eg-flag.jpg
)
)
我想按字母顺序对其进行排序,使其输出完全像:
Array
(
[name] => Array
(
[0] => Australia
[1] => Egypt
[2] => South Africa
)
[img] => Array
(
[0] => au-flag.jpg
[2] => eg-flag.jpg
[1] => sa-flag.jpg
)
)
我无法在两个键上使用排序来将国家名称与国旗同步。