I have multi-dimension array like:
Array
(
[name] => Array
(
[0] => South Africa
[1] => Australia
[2] => Egypt
)
[img] => Array
(
[0] => sa-flag.jpg
[2] => au-flag.jpg
[1] => eg-flag.jpg
)
)
and I want to sort it alphabetically such that its output will exactly like:
Array
(
[name] => Array
(
[0] => Australia
[1] => Egypt
[2] => South Africa
)
[img] => Array
(
[0] => au-flag.jpg
[2] => eg-flag.jpg
[1] => sa-flag.jpg
)
)
I could not be able to use sort on both keys to synchronize the country name with country flag.