The last sorting function I want to discuss in this section is ksort. This function sorts an
array on the values of the indices. I've modified the code in Listing 15.6 to use ksort
instead of arsort. Notice that now all the elements are in the order of their indices, or
keys.
Listing 15.6 Using the ksort Function