PHP Table of Number Program - javatpoint
Table of Number
A table of a number can be printed using a loop in program.
Logic:
- Define the number.
- Run for loop.
- Multiply the number with for loop output.
Example:
We'll print the table of 7.
Difference between JDK, JRE, and JVM
- <?php
- define('a', 7);
- for($i=1; $i<=10; $i++)
- {
- echo $i*a;
- echo '<br>';
- }
- ?>
Output: