table multiple - 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 table multiple.php

  1. <?php
  2. for ($first = 2; $first <= 9; $first++) : ?>
  3.     <table style="float: left; margin: 10px;">
  4.         <tbody>
  5.         <?php for ($second = 1; $second <= 9; $second++) {
  6.             $result = $first * $second;
  7.             echo "<tr><td>{$first} x {$second} = {$result};</td></tr>";
  8.         }
  9.         ?>
  10.         </tbody>
  11.     </table>
  12.     <?php if( $first == 5): ?><hr style="clear: both"> <?php endif;?>
  13. <?php endfor; ?>
File Description
  • table multiple
  • PHP Code
  • 12 Apr-2021
  • 434 Bytes
You can Share it: