Re: [SMARTY] cycling
"messju mohr" <[email protected]>
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <20050618093442.GA3668@dune> |
On Sat, Jun 18, 2005 at 08:32:19AM +0900, D_C wrote:
> is there a way to use a smarty variable as a cycle parameter? tried:
>
> {cycle values=0,stepX assign='posX' }
> {cycle values=0,$stepX assign='posX' }
> {cycle values=0,`$stepX` assign='posX' }
> {cycle values='0,`$stepX`' assign='posX' }
i think you want
{cycle values="0,$stepX" assign='posX' }
see: http://smarty.php.net/manual/en/language.syntax.quotes.php
> but i get the values 0 and "stepX" as a string...
>
> otherwise I guess i can do this but it seems verbose:
>
> {cycle values='0,1' assign='posX' }
> {assign var=posX value=$posX*$stepX}
>
> thanks in advance!
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php