Re: [SMARTY] more problems with loops
| From: | Robert Amos | Date: | Thu, 04 Jul 2002 17:10:55 +0000 |
| Subject: | Re: [SMARTY] more problems with loops | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5200@lists.php.net to get a copy of this message | ||
tried:
{{section name=pageNumber loop=$pageOffsets}}
[{{$smarty.section.pageNumber.index_next}}=>{{$pageOffsets[pageNumber]}}]<br
/>
{{/section}}
?
-bok
On 5/7/02 2:39 AM, Pupeno banged a keyboard and produced the following weird
but readable email:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I have this array:
> Array ( [1] => 0 [2] => 10 [3] => 20 [4] => 30 [5] => 40 [6] => 50 )
> and this code (in Smarty):
> {{section name=pageNumber loop=$pageOffsets}}
> [{{$smarty.section.pageNumber.index}}=>{{$pageOffsets[pageNumber]}}]<br />
> {{/section}}
> And the output I've got is:
> [0=>]
> [1=>0]
> [2=>10]
> [3=>20]
> [4=>30]
> [5=>40]
> while I need
> [1=>0]
> [2=>10]
> [3=>20]
> [4=>30]
> [5=>40]
> [6=>50]
> I've tryed with
> {{section start=1 name=pageNumber loop=$pageOffsets}}
> [{{$smarty.section.pageNumber.index}}=>{{$pageOffsets[pageNumber]}}]<br />
> {{/section}}
> but I've got:
> [1=>0]
> [2=>10]
> [3=>20]
> [4=>30]
> [5=>40]
>
> how can I solve this ?
>
>
>
> - --
> Pupeno: pupeno@pupeno.com
> http://www.pupeno.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9JHpELr8z5XzmSDQRAp8qAJ4l4SC9FYLIXNXaWFXh9URY8TC41gCfSbgr
> L5zCCZYlfeFsWKbjSRb1upg=
> =qtTc
> -----END PGP SIGNATURE-----
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>