<@FOR> </@FOR>
Syntax
<@FOR [START=start]
[STOP=stop] [STEP=step] [PUSH=push]>
</@FOR>
Description
The purpose of the <@FOR></@FOR>
pair is to provide simple for loop functionality.
<@FOR> executes the HTML
and meta tags between the opening and closing tags for each iteration
of the loop. This means that all the HTML between the tags is sent to
the Web server as many times as the <@FOR> loop
specifies. The start and stop values can be specified, as can the step
used to get from one to the other.
Inside a for loop, <@CURROW>
can be used to get the value of the index.
START defines the starting value
for the index, for which the default value is "1".
STOP defines
the stopping value for the index. The loop terminates when this value
is exceeded, not when it is reached. The default value is "0".
STEP defines the increment added
to the index after each iteration. The default value is "1".
PUSH allows the sending of data
to the client after the specified number of iterations have taken
place.
This tag must appear in pairs and cannot
span multiple actions. If the specified step cannot take the index
from start to stop, no iterations are made. If the start equals the
stop, one iteration is made, regardless of the step size.
Example
<@FOR STOP="5">
This function does this <BR>
</@FOR>
This example outputs the following:
This function does this
This function does this
This function does this
This function does this
This function does this |