How to use ‘for’ loop in velocity template?

There’s only #foreach. You’ll have to put something iterable on your context. E.g. make bar available that’s an array or Collection of some sort:

#foreach ($foo in $bar)
    $foo
#end

Or if you want to iterate over a number range:

#foreach ($number in [1..34])
    $number
#end

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)