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

Related : Continue, Do…while, Foreach, Loops, For