Re: [SMARTY] cycling
| From: | messju mohr | Date: | Sat, 18 Jun 2005 09:34:42 +0000 |
| Subject: | Re: [SMARTY] cycling | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12707@lists.php.net to get a copy of this message | ||
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!