Php For Statement

PHP For statement is used when you want to loop the code for number of times,
until condition is met.

Syntax :
for (initialization; condition; increment)
{
code ...
}

Example :

<?php

for ($val=1; $val<=3; $val++)

{

echo "This is the text.<br />";

}

?>

Output of this Php code is :

This is the text.
This is the text.
This is the text.