You are on page 1of 2

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>App Dev</title>
</head>
<body>
<?php
echo "<h1>Hello World</h1><br>";
echo "Hello World<br>";
$a = 10;
$b = 20;
$x = $a > $b ? "$a is larger" : "$b is larger";
echo $x;
?>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>App Dev</title>
</head>
<body>
<?php
echo "<h1>Hello World</h1><br>";
echo "Hello World<br>";
$a = 10;
$b = 20;
//$x = $a > $b ? "$a is larger" : "$b is larger";
if ($a > $b) {
$x = "$a is larger";
} else {
$x = "$b is larger";
}
echo $x;
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>App Dev</title>
</head>
<body>
<?php
$num = 10;
while ($num > 0) {
echo $num . "<br>";
$num--;
}

?>
</body>
</html>

You might also like