Control Flow: Switch 1/6
Glance at the Past!
Let's begin by first refreshing what we have done in the previous course.
Instructions
Write an
if
/elseif
/else
statement inside the editor and make it output anything you wish.<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?
$var = 5;
if ($var < 5) {
echo "<var";
}
elseif ($var > 5) {
echo ">var";
}
else {
echo "==var";
}
?>
</body>
</html>
Comments
Post a Comment