Learning PHP and MySQL
Example 04-14 A sample while loop that counts to 10
<?php
$num = 1;
while ($num <= 10){
print "Number is $num<br />\n";
$num++;
}
print 'Done.';
?>
Posted by on 08/03 at 08:15 AM
Next entry: Example 04-15 Counting to 10 with do… while
Previous entry: Example 04-13 Using endswitch to end the switch definition