Super Simple Script Error Need Help

Status
Not open for further replies.

dquigley

New Member
Messages
249
Reaction score
0
Points
0
So I have this script right here I am writing to learn php and when I check it on my local host I get the error
Parse error: parse error in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\comparisonscript.php on line 53
and line 53 of the code according to my program is simply </HTML> and I see nothing wrong. Please help, here is the code.
<HTML>
<HEAD>
<TITLE>Using Comparison Operators</TITLE>
</HEAD>
<BODY>

<?

$a = 21;

$b = 15;

echo "<P>Original value of \$a is $a and \$b is $b</P>";

if ($a == $b) {
echo "<P>TEST 1: \$a equals \$b</P>";
} else {
echo "<P>TEST 1: \$a is not equal to \$b</P>";

if ($a != $b) {
echo "<P>TEST 2: \$a is not equal to \$b</P>";
} else {
echo "<P>TEST 2: \$a is equal to \$b</P>";
}

if ($a > $b) {
echo "<P>TEST 3: \$a is greater than \b</P>";
} else {
echo "<P>TEST 3: \$a is not greater than \$b</P>";
}

if ($a <$b) {
echo "<P>TEST 4: \$a is less than \$b</P>";
} else {
echo "<P>TEST 4: \$a is not less than \$b</P>";
}

if ($a >= $b) {
echo "<P>TEST 5: \$a is greater than or equal to \$b</P>";
} else {
echo "<P>TEST 5: \$a is not greater than or equal to \$b</P>";
}

if ($a <= $b) {
echo "TEST 6: \$a is less than or equal to \$b</P>";
} else {
echo "TEST 6: \$a is not less than or equal to \$b</P>";
}

?>

</BODY>
</HTML>
 
Status
Not open for further replies.
Top