belongs to collection: PHP Programs
A table of a number can be printed using a loop in program.
Logic:
Example:
We'll print the table of 7.
<?php define('a', 7); for($i=1; $i<=10; $i++) { echo $i*a; echo '<br>'; } ?>
Output:
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.
Example:
We'll print the table of 7.
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer