$staff["givenname"][0] = "J";
$staff["givenname"][1] = "M";
$staff["givenname"][2] = "G";
$staff["surname"][1] = "C";
$staff["surname"][2] = "G";
$staff["surname"][3] = "E";
$res = array_multisort($staff["surname"],SORT_STRING,SORT_ASC,
$staff["givenname"],SORT_STRING,SORT_ASC);
print_r($staff);
?>