Q:

Write a PHP program to print table of number

belongs to collection: Loop PHP programs with examples

0

Write a PHP program to print table of number

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following example.

<?php
 
for ($i = 1; $i <= 10; $i++){
 
$product = 12 * $i;
 
echo "12 x $i: $product <br/>";
}
 
?>

Result:

12 x 1: 12
12 x 2: 24
12 x 3: 36
12 x 4: 48
12 x 5: 60
12 x 6: 72
12 x 7: 84
12 x 8: 96
12 x 9: 108
12 x 10: 120

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

<< Write a PHP Script to sum of odd numbers from 1 to...