21 lines
537 B
PHP
21 lines
537 B
PHP
|
<!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>
|