Hi,
while . . . do: This statement keeps repeating specified statements again and again, so long as a particular condition is true. The statements that are repeated should somehow affect the condition. Otherwise, the statement may never become false and the program will go into an infinite loop. Here is an example of a while loop:
PHP Code:
$a = 2;
while ( $a < 100 )
{
echo " $a";
$a *= $a;
}
$b = 1;
while ( $b < 10 )
{
$a++;
} // OOPS! This is an infinite loop!