I just started using Smarty today so I may be doing this completely wrong, but I can't seem to find a solution to the problem. I'm trying to get a for loop to iterate 4 times, incrementing $i on each iteration. Pretty standard stuff.
According to the Smarty documentation, for loops should be of the following form:
{for $var=$start to $end}
My current loop statement is as follows:
{for $i=0 to 3}
But I am getting the following error at runtime:
Fatal error: Smarty error: [in ..views/landing/index.tpl line 69]: syntax error: unrecognized tag 'for' (Smarty_Compiler.class.php, line 590) in ../library/1.11/Smarty/Smarty.class.php on line 1093
The loop is on line 69 which is the line that the compiler is failing on. I've also shortened the urls in that error message for easier reading.
I'm not sure what I'm doing wrong here. I've tried googling various parts of the error message, but to no avail.
Thanks for your time.