Of course! That was easy... shame on me for not seeing it on the spot :P Thanks, works like a charm.
–
4v4l0n42Dec 21 '10 at 16:29

This answer made me spot a silly mistake in my own code. :o I came up with some very similar code on my own, but I forgot the & before &$value, so I was breaking my head why only my first level was getting sorted. Thanks for unwittingly helping me. ;)
–
BisonDec 4 '14 at 13:05

Some people may not now, so it's worth mentioning that ksort (and asort and similar functions) modify the original array and instead of returning a sorted copy of it they return a boolean. Thus, this function will return a boolean instead of the array itself.
–
DiegoDD3 hours ago