Exercice 2 - 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.



Your result can be seen below.

Result of php executing





Full code of Exercice 2.php

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <?php
  6. for ($a=1;$a<=20;$a++)
  7. if ($a%3 == 0)
  8. {  
  9.     echo "Les chiffres divisibles par 3 compris entre 0 et 20 sont: $a<br />";
  10. }
  11.  
  12. ?> 
  13.  
  14. </body>
  15. </html>
File Description
  • Exercice 2
  • PHP Code
  • 19 May-2022
  • 195 Bytes
You can Share it: