Availability
$WBFOR is available for use with all WBSP commands.
Syntax
$WBFOR{VarName|Start|End|Step|Content}
$WBFOR[VarName|Start|End|Step|Content]
Parameters
VarName - the name of the variable used as a
loop counter. The variable can be accessed using $WBGETV function (see the example)
Start - initial
value of loop counter.
End - final value of loop counter.
Step - optional parameter - amount counter is changed each
time through the loop. It can
be either positive (when start < end) or negative (when start > end). If not specified, step defaults to 1 (one).
Content - block of
code (including WhizBase elements) that will be repeated
through the loop
Returns
Code contained in
content
repeated through the loop.
Example
After running this example, the resulting page in browser, should look like this: