<html>
<! Ksort2.php                                                 >
<! Chapter 6, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script declares an array and reverse sorts it with    >
<! the krsort() function before and after the sort operation. >
<head>
<title>
  Chapter 6 : Ksort2.php
</title>
</head>
<body>
<?php
  // Declare variable.
  $salutation = array("Mr.","Ms.","Mrs.","Dr.");

  // Print structured ordering.
  print "[".print_r($salutation,true)."].<br>";

  // Sort the array members.
  asort($salutation);

  // Print restructured ordering.
  print "[".print_r($salutation,true)."].<br>";

  // Sort the array members.
  krsort($salutation);

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