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";
}