Tutorial WHILE LOOP for PHP.
Result from example is "0123456789".PHP Code:
$x = 0; // define $x
WHILE ($x<9) { // do something while $x<9
echo $x; // do this thing
$x++; // increase $x
} // exit loop when $x>=9
WHILE Loop have to check condition ($x<9) at first. If the condition is TRUE it will begin do something in loop.
Next time I will show you about "DO WHILE LOOP". about how different from WHILE LOOP and how to use.