Technical References - [loop]

Loops through the enclosing text the specified number of times

numero = 245
interpreted = N
texte = [loop Parameters]Any Text or HTML[/loop] The Loop context requires two parameters: Start and End. Looping occurs between (and including) the Start and End value; advancing by 1 each time. You may optionally tell the loop context to advance by a specified amount (other than 1) by using the Advance parameter. Example:
[loop start=1&end=[numAdd]&advance=1][append db=some.db]...[/append]Record [index] added.[/loop]
Using the Loop context you can easily create a form to add an arbitrary number of records to a database. If you chose to add three records, the results would look like this: Record 1 added. Record 2 added. Record 3 added. The following parameters can be used to modify the [loop] context:
ParameterDescription
StartThe starting index value to begin looping. This value is required and may be positive or negative.
EndThe ending index value when looping. This value is required and may be positive or negative.
Advance(Optional) The amount to advance by when looping. This parameter is optional and may be positive or negative, the default value is 1. For example, [loop start=1&end=7&advance=2][index][/loop] would loop 4 times using [index] values 1,3,5,7.
The following tags are available inside a [loop] context:
TagDescription
[index]Displays the current index number between or including Start and End.
[break] If the [loop] context sees the [break] tag while executing a loop, it will stop looping, once it finishes the current loop. Thus the [break] tag should only appear in a [showif] statement that is evaluated at the end (bottom) of the loop.
[loop Parameters]Any Text or HTML[/loop]

The Loop context requires two parameters: Start and End. Looping occurs between (and including) the Start and End value; advancing by 1 each time. You may optionally tell the loop context to advance by a specified amount (other than 1) by using the Advance parameter.

Example:
[loop start=1&end=[numAdd]&advance=1]
[append db=some.db]...[/append]Record [index] added.
[/loop]

Using the Loop context you can easily create a form to add an arbitrary number of records to a database. If you chose to add three records, the results would look like this:

Record 1 added.
Record 2 added.
Record 3 added.

The following parameters can be used to modify the [loop] context:
ParameterDescription
StartThe starting index value to begin looping. This value is required and may be positive or negative.
EndThe ending index value when looping. This value is required and may be positive or negative.
Advance(Optional) The amount to advance by when looping. This parameter is optional and may be positive or negative, the default value is 1. For example, [loop start=1&end=7&advance=2][index][/loop] would loop 4 times using [index] values 1,3,5,7.


The following tags are available inside a [loop] context:
TagDescription
[index]Displays the current index number between or including Start and End.
[break] If the [loop] context sees the [break] tag while executing a loop, it will stop looping, once it finishes the current loop. Thus the [break] tag should only appear in a [showif] statement that is evaluated at the end (bottom) of the loop.



DOWNLOAD WEBDNA NOW!

Top Articles:

WebDNA Modules

A list of the currently available modules...

F.A.Q

A compilation of some user's questions...

Download WebDNA Applications

WebDNA applications...

Tips and Tricks

A list of user-submitted tips ...

WebDNA Libraries

A list of available libraries for WebDNA...

Technical Change History

This Technical Change History provides a reverse chronological list of WebDNA changes...

Related Readings:

[movefile]

This instructions move a file from one location to another...

[removelineitem]

...

[getchars]

Extracts a portion of the text (also known as substring or Mid$)...

triggers

Triggers provide a mechanism for doing something on a regular timed basis...

[countchars]

Counts the number of letters inside the context...

[addlineitem]

Adds a product to the specified shopping cart...