if
has only one section: Condition
if (Condition) {
// Code to be executed
}
for
loop has three sections divided by ;
for (Initialization; Condition; Increment/Decrement) {
// Code to be executed
}
The loop prints numbers from 0 to 10
for ($i = 0; $i < 10; $i ++) {
echo $i . "\n";
}