range
Creates a loop of numbers that can be applied to a data feed. Parameter 1 is the start index, parameter 2 is the end index, and a third (optional) parameter is the number of “steps” between.
Copy
range()
Example
Ask subscribers to rate your content match to their interests
This example demonstrates how to show a range of numbers incremented by 10.
Zephyr:
In the code:
Copy
{* Shows every increment 10 from -50 to +50.*}
Tell us how well this content matches you!<br>
{foreach range(-50,50,10) as i}
<a href="https://www.example.com?rating={i}">{i}%</a>
{/foreach}
Output:
Tell us how well this content matches you!
-50% -40% -30% -20% -10% 0% 10% 20% 30% 40% 50%