The PHP while() loop

The simplest loop is the while loop. Simple format and repeats while the condition is true.

[source:php]$num = 0;
while ($num < 10) {
print $num;
$num++;
}
[/source]

This of course would print the numbers from 0 to 9 in one long line ie. 0123456789

No Responses to “The PHP while() loop”

Leave a Comment

Please use your real name or nickname. Spam names will be changed.