for
 
 
 

A for loop has this format:

for (initialization; condition; change of condition) {
	statement;
	statement;
 ...
}

The brackets after for statement must contain three parts, separated by semicolons. It’s very important to understand the relationship between these parts:

A for loop evaluates the termination condition before executing each statement. The condition compares variable, attribute, or constant values.

int $i;
for ($i = 10; $i > 0; $i--) {
	print($i+"...\n");
}
print("Blastoff!!!");