Tutorials

Learn web design and programming with our free video and text tutorials.

PHP Loops Tutorials

A PHP loop statements allow you to perform a repitive task until a given condition is met.

There are a number of different loop statements in PHP:

PHP while loops
PHP while loops will execute a block of code if and as long as a specified condition is true.

PHP do...while loops
PHP do while loops execute a block of code at least once and then it will repeat the loop as long as a condition is true.

PHP for loops
PHP for loops execute a block of code a specified number of times.

PHP foreach loops
PHP foreach are used to loop through arrays.