task_1 - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of task_1.php
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- </head>
- <body>
- <?php
- $a = rand(20, 50);
- echo("<p>Your number: $a</p>");
- echo("<p>Dividers:</p>");
- echo("<ol>");
- for ($i=1; $i<$a+1; $i++) {
- if ($a % $i == 0) {
- echo("<li>$i</li>");
- }
- }
- echo("</ol>");
- ?>
- </body>
- </html>
File Description
- task_1
- PHP Code
- 20 Jan-2022
- 301 Bytes
You can Share it:
Related Tools