If you do not know in advance how many values there are in an array, you can create a
#foreach directive that loops over all values in a one dimensional array.
In this example, the #foreach directive loops over all values of the array
$array, and writes the values to the output. The variable
$array is defined in a StreamServe script.
You can also create a #foreach directive that loops over a fixed number of values of an array.
In this example, the #foreach directive loops over the first four values of the array
$array, and writes the values to the output.
In the StreamServe script you can create a counter variable that defines the full range of an array, and then use this counter variable to define the range to loop over.
In this example, the #foreach directive loops over the range
[0..$counter] of the array
$array, and writes the values to the output. The variables
$array and
$counter are defined in a StreamServe script.