Testing for counter value
| From: | Sarah Gray | Date: | Tue, 13 Jul 2004 17:35:59 +0000 |
| Subject: | Testing for counter value | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11580@lists.php.net to get a copy of this message | ||
Hi --
I feel like this is elementary but I'm a little stuck. Sorry
if this is obvious -- it's not to me, right now ;)
What's the syntax for testing if {counter}is at a certain value?
I started a counter in a foreach loop and it increments and is reset
periodically
and I want to be able to say
{if counter == 2}
// do something
{/if}
Anyway, nothing happens, it's like the if statement isn't seen.
[also tried {if $counter==2} and {if {counter} == 2}]
Is this possible?
Thanks,s.