For loop in PHP

For loop in php

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