For loop in PHP
for loop
It executes a block of code until the given condition is true.
Syntax :
for( initialization ; condition ; increment/decrement)
Example :
<?php
for($i = 0; $i <5; $i++)
{
echo $i;
}
?>
Output for the above code : 01234
for loop
It executes a block of code until the given condition is true.
Syntax :
for( initialization ; condition ; increment/decrement)
Example :
Output for the above code : 01234
© Copyright - 2018 - 2021 | All rights reserved at Funda of Web IT