Sorting an associative array alphabetically
That snippet of 3 lines you used,
is fine as it is, nothing really wrong with it.
It's proper, efficient, natural, easy to understand.

There is just one thing I'd pick on,
is that the $value variable in the foreach expression is not used.
Another way to achieve the same thing without unused variables is to use &amp; to pass the loop variable by reference:

foreach ($array_name as &amp;$arr) {
    ksort($arr);
}


This has the advantage that the loop index variable $key is now gone too,
we're working with the data that really matters, which is the $arr to sort.