<html>
<! FlexibleParameters.php                                     >
<! Chapter 7, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This demonstrates defining a function without formal       >
<! parameters and passing it actual parameters that are then  >
<! processed by the func_num_args() and func_get_args()       >
<! functions.                                                 >
<head>
<title>
  Chapter 7 : FlexibleParameters.php
</title>
</head>
<body>
<?php
  // Call function.
  print_string("Oh yeah, baby!","There's no prototype required.");

  // Define a function that prints a string.
  function print_string()
  {
    // Check for actual parameters.
    if (func_num_args() > 0 )

      // Process list of actual parameters.
      foreach (func_get_args() as $index => $arg)
        print "Parameter List [".$index."][".$arg."]<br>";
  }
?>
</body>
</html>
