I got a multidimensional array which may look like this:
$array[1][0] = \"string\"; $array[0][1] = \"anotherstring\"; $array[0][0] = \"thirdstring\"; $array[1][1
You can shorten your loop with:
ksort($array); foreach($array as &$value) { ksort($value); }
Or use array_walk:
array_walk
ksort($array); array_walk($array, 'ksort');