<html>
<! Intersect.php                                              >
<! Chapter 6, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This declares an array and demonstrates the                >
<! array_intersec() function.                                 >
<head>
<title>
  Chapter 6 : Intersect.php
</title>
</head>
<body>
<?php
  // Declare three arrays.
  $one = array("Denmark","Finland","is"=>"Iceland","Germany","Sweden");
  $two = array("Denmark","Finland","Ireland","is"=>"Iceland","Denmark","United Kingdom");
  $three = array("Denmark","Germany","Ireland","is"=>"Iceland");

  // Sort the array members.
  $intersect = array_intersect_assoc($one,$two,$three);

  // Read and print spliced array keys and values to the page.
  foreach($intersect as $code => $name)
    print "[".$code."][".print_r($name,true)."]<br>";
?>
</body>
</html>
