我有一个多维关联数组,我试图按字母顺序和大小排序。检查我当前得到的示例,但现在我想按字母顺序对键“ACC,ABB,AAB”进行排序,如果有意义的话,不编辑大小排序。
arsort($myarray);
// Returns an array sorted by its value size from biggest to smallest but need to to also sort it keys alpabetically without amongest keys that have the same size.
$myArray = Array ( <--- Arrange this alphabetically and by size
[AAA] => Array ( is 1st
[1] => 1
[2] => 1
[3] => 1
[4] => 1
)
[ACC] => Array ( should be 3rd
[1] => 1
[2] => 1
)
[ABB] => Array ( should be 2nd
[1] => 1
[2] => 1
)
[AAB] => Array ( should be 1st
[1] => 1
[2] => 1
)
[AA] => Array ( is 1st
[1] => 1
)
[AB] => Array ( is 2nd
[1] => 1
)
)