1. For loop
    2. While loop
    3. Do-while loop
    4. Foreach loop

For loop

Syntax

for (initialization expression; test condition; update expression) {
// code to be executed
}

While loop

Syntax

             while (if the condition is true) {
// code is executed
}

Do-while loop

Syntax

do {

//code is executed

} while (if condition is true);

Foreach loop

Syntax

foreach (array_element as value) {
//code to be executed
}

 

Categorized in:

PHP

Tagged in:

, , , , , , , , , , , ,

Share Article:

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO