<html>
<! MultiSort.php                                              >
<! Chapter 6, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script declares an array and uses the                 >
<! array_multisort() function to sort and prints it both      >
<! before and after the sort operation.                       >
<head>
<title>
  Chapter 6 : MultiSort.php
</title>
</head>
<body>
<?php
  // Declare array variable.
  $salutation1 = array("Mr.","Mrs.","Dr.");
  $salutation2 = array("Monsuier","Madame","Doctuer");

  // Print structured ordering.
  print "[English][".print_r($salutation1,true)."].<br>";
  print "[French][".print_r($salutation2,true)."].<br>";

  // Sort the array members.
  array_multisort($salutation1,SORT_DESC,$salutation2);

  // Print restructured ordering.
  print "[English][".print_r($salutation1,true)."].<br>";
  print "[French][".print_r($salutation2,true)."].<br>";
?>
</body>
</html>
