1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
PHP_TP1/helloworld2.php

21 lines
537 B
PHP
Raw Normal View History

2020-09-10 15:56:40 +02:00
<!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>