I want to add a constant value to a variable in smarty. just like:
{assign var='c' value='0'}
$c=$c+1
Try this:
{assign var='c' value=0}
{assign var='c' value=$c+1}
The short form should work too, but you say it doesn't.
{$c=0}
{$c=$c+1}
But this doesn't work because you're using Smarty 2, right? Because in Smarty 3 it should work.