Print multiplication table by using for Loop

Amit Kumar
Jul 31, 2021

--

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

Example

<?php

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

?>

Output

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

--

--

Amit Kumar
Amit Kumar

Written by Amit Kumar

Hi I am Amit Experienced Web Developer with a demonstrated history of working in the information technology and services industry.

No responses yet