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.
Result of php executing
Full code of table multiple.php
- <?php
- for ($first = 2; $first <= 9; $first++) : ?>
- <table style="float: left; margin: 10px;">
- <tbody>
- <?php for ($second = 1; $second <= 9; $second++) {
- $result = $first * $second;
- echo "<tr><td>{$first} x {$second} = {$result};</td></tr>";
- }
- ?>
- </tbody>
- </table>
- <?php if( $first == 5): ?><hr style="clear: both"> <?php endif;?>
- <?php endfor; ?>