index - 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 index.php

  1. <?php
  2. echo '<table>';
  3.  
  4.  
  5. for($i=0;$i<10;$i++)
  6. {
  7.         echo '<tr>';
  8.                 for ($j = 0; $j<10; $j++){
  9.                 $randnum = rand(0, 200);
  10.  
  11.                 if($randnum < 10){echo '<td class="sing">';}
  12.                 elseif($randnum < 100){echo '<td class="decr">';} else{echo '<td class="hund">';}
  13.                 echo $randnum;
  14.                 echo '</td>';
  15.         }
  16.  
  17. }
  18.  
  19. echo '</table>';
  20. ?>
File Description
  • index
  • PHP Code
  • 19 Mar-2021
  • 308 Bytes
You can Share it: