array(1) {
[0]=>
array(1) {
["12345"]=>
array(1) {
["orange"]=>
string(46) "test.jpg"
["blue"]=>
string(46) "test2.jpg"
["green"]=>
string(46) "test3.jpg"
}
}
}
I want to sort it by key:
foreach ($array as $key => $value) {
if(is_array($value)){
foreach ($value as $k => $v) {
usort($v);
foreach ($v as $fileIterator => $fileData) {
echo $fileIterator;
}
}
}
}
This is the result
orange
blue
green
But I expect the order to be
blue
green
orange