Re: [SMARTY] Apply math to count result

[email protected] (messju mohr) Fri, 9 Feb 2007 12:18:18 +0100
Newsgroups php.smarty.general
Message-ID <[email protected]>
On Fri, Feb 09, 2007 at 05:11:41AM -0600, Bryan Roach wrote:
> This must be simple but the answer is eluding me... I am using
> "{$names|@count}" to count the elements in the $names array. But I
> need to add one to the result before it is displayed. Just throwing a
> " + 1" in there gives an error, so how is it done? Thanks!

{math equation="n+1" n=$names|@count}