<html>
<! ArrayKeys2.php                                             >
<! Chapter 5, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This declares an array by assigning all elements, then     >
<! it uses a array_keys function to search and return an      >
<! any key pointing to a matching value.                      >
<head>
<title>
  Chapter 6 : ArrayKeys2.php
</title>
</head>
<body>
<?php
  // Declare an array variable.
  $salutation = array("Dr.","Mr.","Mrs.","Ms.");

  // Print the formatted contents.
  print "[".(print_r($salutation,true))."].<p>";

  // Return the keys into an array.
  $result = array_keys($salutation,"Mr.");

  // Print the formatted contents.
  print "[".(print_r($result,true))."].";

?>
</body>
</html>
