counter++

25 views
Skip to first unread message

Karel S.

unread,
Oct 21, 2009, 5:16:51 AM10/21/09
to Smarty Developers
{assign var="counter" value=1}

{foreach //bla}
<p>{$counter++}</p>
{/foreach}

Fatal error: Uncaught exception 'Exception' with message 'Syntax Error
in template "/var/.../test.tpl" on line 48 " {$counter++}" -
Unexpected "++", expected one of: "}"' in /var/.../sysplugins/
internal.templatecompilerbase.php:261

U.Tews

unread,
Oct 21, 2009, 5:51:53 AM10/21/09
to Smarty Developers
This was a missing feature. It's in the SVN now

Karel S.

unread,
Oct 21, 2009, 6:01:49 AM10/21/09
to Smarty Developers
Thanks
Reply all
Reply to author
Forward
0 new messages