Conditionals and Control Flow 1/4
Comparisons
So far we've seen:
- strings (e.g.
"dogs go woof!"
) - numbers (e.g.
4
,10
)
Now let's learn about comparison operators.
List of comparison operators:
>
Greater than<
Less than<=
Less than or equal to>=
Greater than or equal to==
Equal to!=
Not equal to
Instructions
On line 8, use a comparison operator to compare two numbers. Make sure to end your line of code with a semicolon.
<html>
<head>
<title>Comparing Numbers</title>
</head>
<body>
<p>
<?php
6 < 7;
?>
</p>
</body>
</html>
Comments
Post a Comment