• [set numbers='400,401,402,403,404']
    [for each=numbers]
      [each]
    [/for]

    I was hoping to display each number from the list.

    1. Have I created a list?
    2. Can this be achieved with [for]?
    3. I don’t need to use [pass] as the variable has been set?
    4. Can I use the range ~ operate to create a list like this?
    5. I assume this could also be done with [loop] too?
Viewing 1 replies (of 1 total)
  • Thats not valid:

    Try:

    [set numbers]400,401,402,403,404[/set]
    [pass vars]
    [-pass list={NUMBERS}]
    {-ITEM}
    [/-pass]
    [/pass]

    Have I created a list? – NO
    Can this be achieved with [for]? – NO
    I don’t need to use [pass] as the variable has been set? – NO – And this does not set a list
    Can I use the range ~ operate to create a list like this? – YES
    I assume this could also be done with [loop] too? – ??

    • This reply was modified 3 years, 11 months ago by polarracing.
    • This reply was modified 3 years, 11 months ago by polarracing.
Viewing 1 replies (of 1 total)
  • The topic ‘Using [for each] with a variable list’ is closed to new replies.