In this tutorial I will give a brief lesson on the PHP while statement.
Keep in mind that I don't practice the proper 'formatting' of code (like indenting).
It
doesn't matter, but it does make things easier for big projects.
This will check to see if $number is less than 10.
If $number is less than 10, then print the current number with a <br>.
The result would look like:
1
2
3
4
5
6
7
8
9
10
[Back To PHP Tutorials]