Print multiplication table by using for Loop

What is Loop?

Any Repeated task more than one time that is called Loop. In a loop structure, the loop asks a question. If the answer requires action, it is executed. Using loops in computer programs simplifies rather optimizes the process of coding.

For Loop :- The for is frequently used usullay where the loop will be traversed a fixed numbers of times. A loop variable is used to control the loop



for($ami=1; $ami<=20; $ami++)
echo "for loop:". $ami*2 . "<br />";



When the above program is executed, it produces the following result −