for

suggest change

for loops are typically used when you have a piece of code which you want to repeat a given number of times.

for ($i = 1; $i < 10; $i++) {
    echo $i;
}

Outputs: 123456789

For detailed information, see the Loops topic.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents