<html>
<! VariableAssignment1.php                                    >
<! Chapter 4, Oracle Database XE PHP Web Programming          >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script demonstrates variable assignments and scope.   >
<head>
<title>
  Chapter 4 : VariableAssignment1.php
</title>
</head>
<body>
<?php
  // Declare variables by assigning a value.
  $myVar1 = 1;
  $myVar2 = 2;

  // Decalre a variable by assigning a reference to another variable.
  $myVar3 = &$myVar2;

  // Print and format variables to the web page.
  print "\$myVar1 [" . $myVar1 . "]<br>";
  print "\$myVar2 [" . $myVar2 . "]<br>";
  print "\$myVar3 [" . $myVar3 . "]<br><p>";

  // Print a line break;
  print "<hr>";

  // Re-assign value to variable held by value and reference.
  $myVar3 = "Three";

  // Print and format variables to the web page.
  print "\$myVar1 [" . $myVar1 . "]<br>";
  print "\$myVar2 [" . $myVar2 . "]<br>";
  print "\$myVar3 [" . $myVar3 . "]<br>";
?>
</body>
</html>
