Forum Moderators: coopster
for ($i=0; $i<3; $i++ )
{
echo $i;
}
Then you will see a display of 012. What the loop is saying is $i starts as 0, then so long as the value of $i is less than 3, it will continue looping. The start value is set at 0, so the first increment will be this value. Once it reaches 2, it stops because the next value (3) would be false. The $i++ is the same as doing $i=$i+1.
Its quite popular in most (well, probably all) programming languages.