<html>
<! Modulo.php                                                 >
<! Chapter 4, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script demonstrates the modulo math concept.          >
<head>
<title>
  Chapter 4 : Modulo.php
</title>
</head>
<body>
<?php
  // Include the arithmetic display library.
  include("DisplayLibrary.php");

  // Declare int variables.
  $numerator1 = 16;
  $numerator2 = 17;
  $denominator = 2;

  // Define two variables without type definition.
  $modulus;

  // Get an integer by adding two integers.
  $modulus = $numerator1 % $denominator;

  // Display math operation.
  display_modulo_results('$modulus',$modulus
                        ,'$numerator1',$numerator1
                        ,'$denominator',$denominator);

  // Get a float when one integer is cast as a float.
  $modulus = $numerator2 % $denominator;

  // Display math operation.
  display_modulo_results('$modulus',$modulus
                        ,'$numerator2',$numerator2
                        ,'$denominator',$denominator);
?>
</body>
</html>
