Onetastic Macro Documentation >
>
for
for Statement
Description
Executes an initialization expression followed by a set of until the given boolean expression evaluates false. Evaluates the increment expression after each iteration. You can break out of a for loop using a break statement or skip to the next iteration using a continue statement.
Syntax
for (init-expression, boolean-expression, increment-expression)
Statements...
Examples
$sum = 0
for ($i = 1, $i < 5, ++$i)
$sum += $i
See Also
|