A Loop is an Iterative Control Structure which requires a number of times until a given condition is met to perform the same number of codes. Sometimes when you write code, you would like a number of times the block of code to run repeatedly. So, we can use loops rather than applying almost identical code lines to a script.
Loops are used again and again to run the same block of code, provided a certain requirement is fulfilled. The fundamental concept behind a loop is to simplify repeated processes in a programmer so as to save time and effort.
A flow chart explain how loops working in PHP:
In PHP there are following types Loops: