While

While is a loop structure. It runs the block of code until the condition is not met anymore.

Part of the loop execution may be skipped by using the continue keyword.

<?php

/*
while(condition) {
    // the block
}
*/

$i = 0;
while($i < 10) {
    print "$i\n";
}

?>

Documentation

See also 0 <`While Loop in PHP>`_.

Related : Continue, Do While, foreach(), Loops, For, Control Flow