For loops allow you to do something a certain number of times in their most basic forms;
First the variable is set to 1, then it is tested to see if it is less than or equal to 100.
Then it is printed. Then the change expression is evaluated and $i is incremented by 1.
Then the text expression is evaluated again since $i is equal to 2 it is less than or equal to 100
so the loop is repeated until 100 is printed, $i is incremented to 101, $i is no longer less than or equal to 100 so the for loop is finished.
In reply to for loops
by root