You can use the uasort function, which allows you to specify a custom sorting method while also preserving keys:
'Sarah Green',
29 => 'Adam Brown',
68 => 'Fred Able'
);
// Perform the sort:
uasort($array, 'lastNameSort');
// Print the result:
print_r($array);
?>
Here's a demo.