PHP Looping

Sometimes we want a program to repeat something over and over again. A loop is used to make a program do something more than one time.

PHP loops execute a block of commands a specified number of times until a condition is met.

PHP supports following types of loops:

All are slightly different and provides loops for different situations.