Re: [SMARTY] Re: Increment value
| From: | Thomas Schulz | Date: | Sun, 23 Feb 2003 23:20:58 +0000 |
| Subject: | Re: [SMARTY] Re: Increment value | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8143@lists.php.net to get a copy of this message | ||
Nino Katic schrieb in php.smarty.general:
>>> Is there some nice, easy, simple etc. way to increment value inside
>>> smarty template.
>>
>>
>> http://smarty.php.net/manual/en/language.function.counter.php
>
> Counter is nice function but i think it's not made for that. Anyway how
> would you make an {if} statement using it? {if counter == something} ?
{* start counter *}
{counter start=0 assign="cntval"}
{* raise counter *}
{counter}
{* use the value of the counter *}
{if $cntval eq something}
--
http://4bconsult.de