for loop through a block of code a specified number of time.

for loop syntax :

fro(initialization;condition;increment)
{
here code which you want to exicute;
}

in that syntax initialization is used to set the start value of counter of thee number of iteration.
we can also declare a variable for that loop.

Here given a example of for loop..

//start php here
$x= 0;
$y= 0;

for($z=0;$z<5;$z++) { $x+=10; $y+=5; } echo "$x"; echo "$y";