1
0
Fork 0

Make helloworld2

This commit is contained in:
Ethanell 2020-09-10 15:56:40 +02:00
parent 8732a845d2
commit ca070249c9

21
helloworld2.php Normal file
View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello World 2</title>
</head>
<body>
<ul>
<?php
if (isset($_GET["nb"])) {
$nb = (int) $_GET["nb"];
if ($nb >= 0 and $nb <= 100)
for ($i = 0; $i < $nb; $i++) { ?>
<li>Hello World !</li>
<?php }
} else { ?>
<strong>Invalid number !</strong>
<?php } ?>
</ul>
</body>
</html>