belongs to collection: Loop PHP programs with examples
Write a PHP program to print table of number
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: 1212 x 2: 2412 x 3: 3612 x 4: 4812 x 5: 6012 x 6: 7212 x 7: 8412 x 8: 9612 x 9: 10812 x 10: 120
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
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.
Result:
12 x 1: 12
need an explanation for this answer? contact us directly to get an explanation for this answer12 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