- print_r: documentation ( source)
- sort: documentation ( source)
- ksort: documentation ( source)
<?php
$array = [
'd' => [
'f',
'e',
],
'a' => [
'c',
'j',
],
];
ksort($array);
foreach ($array as $key => &$values) {
sort($values, SORT_NATURAL);
}
print_r($array);