<html>
<! Switch1.php                                                >
<! Chapter 4, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script demonstrates a switch statement using a        >
<! scalar value.                                              >
<head>
<title>
  Demonstrating a switch statement using a value.
</title>
</head>
<body>
<?php
  // Declare a variable by assigning a value.
  $myVar = 2;

  switch ($myVar)
  {
    case 0:
      print "\$myVar is a [".$myVar."].";
      break;
    case 1:
      print "\$myVar is a [".$myVar."].";
      break;
    case 2:
      print "\$myVar is a [".$myVar."].";
      break;
    default:
      print "\$myVar is a [".$myVar."].";
      break;
  }
?>
</body>
</html>
