PHP loops let you run a block of PHP code over and over again. They’re great for repetitive tasks such as reading data records from a database, or displaying rows of a table in a Web page.
while loop is the simplest type of loop to understand. In this article you look at the syntax of a PHP
while loop, and explore some example loops. You also look at