simple code example:
<?
while ($a < 10 ) {
echo "$a, ";
$a++;
}
echo "Finished";
?>
Will output,
1, 2, 3, 4, 5, 6, 7, 8, 9, Finished
this will run through the loop WHILE $a is less than 10, outputting the value of $a to the screen.
once $a = 10 then the loop will end and continue on with the rest of the script