<html>
<! IfThen3.php                                                >
<! Chapter 4, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script demonstrates an if-then-else-if-then-else      >
<! statement with single expression evaluations.              >
<head>
<title>
  Demonstrating an if-else-if-else statement.
</title>
</head>
<body>
<?php
  // Declare variables by assigning a value.
  $myVar = 0.234;

  // Check if variable is greater than or equal to 1.
  if ($myVar >= 1)
  {
    // Print desired message.
    print "\$myVar is a positive number 1 or greater.";
  }
  // Check if variable is equal to zero.
  else if ($myVar == 0)
  {
    // Print desired message.
    print "\$myVar is zero.";
  }
  // Check if variable less than zero.
  else if ($myVar < 0)
  {
    // Print desired message.
    print "\$myVar is a negative number.";
  }
  // The only thing left is a real number between 0 and 1.
  else
  {
    // Print desired message.
    print "\$myVar is a real number between 0 and 1.";
  }
?>
</body>
</html>
