====== How the php array_multisort function works ====== The array_multisort function in php allows you to sort several arrays at the same time. How it works is: - Sort first array by key value (depending on arguments) - If there are any identical keys in the first array, sort these by the keys in the second array (assuming it is specified) - etc. The [[http://www.php.net/manual/en/function.array-multisort.php|documentation]] for this isn't particularly clear.