PHP program to print table of a number
in this program i will show you how to generate table of any number
using php
first of all you create a for loop and create a variable where you store your table number
code:-
<?php
$value=8;
echo "table of $value <br>";
for($i=1;$i<=10;$i++)
{
echo "$value * $i = ".$value*$i."<br>";
}
?>
output:-
8 * 1 = 8
8 * 2 = 16
8 * 3 = 24
8 * 4 = 32
8 * 5 = 40
8 * 6 = 48
8 * 7 = 56
8 * 8 = 64
8 * 9 = 72
8 * 10 = 80
Post a Comment
If you have any doubts, Please let me know
Thanks!