A sample while loop that counts to 10 : While loop « Statement « PHP
- PHP
- Statement
- While loop
A sample while loop that counts to 10
<?php
$num = 1;
while ($num <= 10){
print "Number is $num<br />";
$num++;
}
print 'Done.';
?>
Related examples in the same category