That was what I suspected but I wasn't quite sure how to implement. I actually find a great tutorial
http://www.the-art-of-web.com/php/sortarray/ which is exactly like what you're stating, I came up with the following:
function customSort($a, $b){
global $sortBy;
$retval = 0;
reset($sortBy);
do{
$retval = strnatcmp($a[current($sortBy)], $b[current($sortBy)]);
}while(!$retval && next($sortBy) !== false);
return $retval;
}
?>
Where the variable $sortBy is actually an array containing the order of keys in which a user would wish to perform the sorting so in the example I gave something like $sortBy = array('lastName', 'firstName'); What I'm trying to figure out now is how I could do it recursively assuming there were repeating keys within a nested array.