Bjarte Karlsen has a handy tip posted to his blog today - one array function to keep in mind when doing more than just the basic sorting - uasort.
Problem: You have an array of objects or a multidimentional arrays where the key of the first array has some meaning. It could be a id or something else. You want to sort the array and maintain the key=>value association.
Some may then proceed to loop the array and sort it in a loop, however there is a easier method.
He reminds us that the fucntion allows you to take in the array and, based on a user-defined function, sort the results, keeping the association between the keys and values.