Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>First Steps Into PHP</title>
- </head>
- <body>
- <form>
- N: <input type="text" name="num1" />
- M: <input type="text" name="num2" />
- <input type="submit" />
- </form>
- <!--Write your PHP Script here-->
- <?php
- if (isset($_GET['num1']) && ($_GET['num2'])){
- $n = intval($_GET['num1']);
- $m = intval($_GET['num2']);
- echo "<ul>";
- for($i = 1; $i <= $n; $i++) {
- echo "\t<li>List $i\n\t\t<ul>\n";
- for($j=1; $j <= $m; $j++) {
- echo "\t\t\t<li>\n\t\t\t\tElement $i.$j\n\t\t\t</li>\n";
- }
- echo "\t\t</ul>\n\t</li>";
- }
- echo "</ul>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement