PHP: Looping Statements in PHP

In programming it is often required to repeat a block of code for a given number of times or until a certain condition is not true. For this, we use looping statements. PHP has two major looping statements (FOR and WHILE).