This shows an example of sorting an associative array
by supplying a custom-defined sorting function to
Arrays are sorted according to string length
(Shorter is higher in sort order on Ascending ... and vice-versa.)
arrays really are "objects.")
I had to write a function to convert my associative array into an indexed one, so it
could be sorted.
Feel free to use it if you need to iterate through your associative array.