Original Array

[Fred] => 31
[Al] => 27
[Gandalf] => wizzard
[Betty] => 42
[Frodo] => hobbit

Array sorted with sort

[0] = 27
[1] = 31
[2] = 42
[3] = hobbit
[4] = wizzard

Array sorted with asort

[Al] = 27
[Fred] = 31
[Betty] = 42
[Frodo] = hobbit
[Gandalf] = wizzard

Array sorted with ksort

[Al] = 27
[Betty] = 42
[Fred] = 31
[Frodo] = hobbit
[Gandalf] = wizzard