<html>
<! Foreach2.php                                               >
<! Chapter 4, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script demonstrates foreach loop against an           >
<! associative array using string index values found in       >
<! a predefined $_SERVER variable.                            >
<head>
<title>
  Demonstrate a foreach loop against $_SERVER.
</title>
</head>
<body>
<?php
  // Begin an HTML table.
  print "<table border=1>";

  // Start a loop until a condition is met.
  foreach ($_SERVER as $hashName => $hashValue)
  {
    // Print $hashmap name and value pairs in table cells.
    print "<tr>";
    print "<td>".$hashName."</td>";
    print "<td>".$hashValue."</td><tr>\n";
  }

  // Close an HTML table.
  print "</table>";

?>
</body>
</html>
