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";
}
?>
See also While Loop in PHP