Type of loop in php

There is mainly four type of loops.
Loops are used to execute the same block of code a specified number of times in php.

1. for loop.
2. while loop.
3. Do-while loop.
3. foreach loop.

Syntax

for (initialization; condition; increment)
{
code to be executed;
}

Related Post

Leave a Reply