• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Template : for loop alternative ? Eg : Generate html code for 5 times.

allewreK

Active member
#1
Hello,

I made a form, where a user choose a number (let's say 5 as en example).

When he POST the request, I am sending to my template this number. I would like that, in the template, a code is generated XX times (5 times here).

Since it's a simple number, I don't get a way to parse it into my foreach loop (since foreach needs an array).

Any ideas ?

Regards.