The for Loop
The for loop is used when you know in advance how many times the script should run. Parameters: init: Initialize the loop counter value test: Evaluates each time the loop is iterated, continuing if evaluates to true, and ending if it evaluates to false increment: Increases the loop counter value
for ($i = 0; $i < 10; $i++) {
    echo "Value of i is: " . $i . "\n";
}
by Elena Kuparadze
2 years ago
PHP
Loop
0
Pro tip: use ```triple backticks around text``` to write in code fences