Re: [SMARTY] increment a smarty value

"A.J. Brown" <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <001201c5ceaf$db143360$6600a8c0@aj>
John,

Check the counter function, this may be what you're looking for.  You can 
use the print variable to turn off the output:

http://smarty.php.net/manual/en/language.function.counter.php

----- Original Message ----- 
From: "John Nichel" <[email protected]>
To: <[email protected]>
Sent: Tuesday, October 11, 2005 6:04 PM
Subject: [SMARTY] increment a smarty value


> Long time php developer, but don't dabble too much into the Smarty world, 
> so I'm wondering if y'all can give me a hand.  I'm trying to increment a 
> smarty value by 1 each time I go thru my while loop (added while loop 
> functionality to our Smarty compiler), but I can't find a good way to do 
> it.  In fact, the only way that seems to work is doing it like this....
>
> { while $test < 10 }
> { $test++ }
> { /while }
>
> But that echo's out the variable each time thru the loop.  Is there a way 
> in Smarty to do this without printing out the variable?  Thanks.
>
> -- 
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [email protected]
>
> -- 
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> 

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.