for
suggest changefor
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.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents