Ok, I found the following on PHP.net:
http://us3.php.net/array_multisort - Example 3:
// Obtain a list of columns
foreach ($data as $key => $row) {
$volume[$key] = $row['volume'];
$edition[$key] = $row['edition'];
}
// Sort the data with volume descending, edition ascending
// Add $data as the last parameter, to sort by the common key
array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $data);
I understand it but the problem I'm having with it is the variable names: $volume and $edition.
How do I code that part to deal with any associative array?