Re: [SMARTY] a Smarty equivalent of the php 'for'
| From: | Ivo Jansch | Date: | Mon, 19 Sep 2005 12:08:17 +0000 |
| Subject: | Re: [SMARTY] a Smarty equivalent of the php 'for' | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13047@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
pobox@verysmall.org wrote:
> Is there a Smarty equivalent of the php 'for'? I could not find so far.
> I have an array which I process in a peculiar way, and I just need a
> simple counter to turn the cycle and stop at some point, which stop I
> can control from within the cycle. At the moment I use a combination of
> 'foreach', without using the 'item' and a 'counter' in addition
> which
> provides the values I need, but looks primitive and I can't stop it.
To keep your template logic simple, it's probably a good idea to convert
your array structure to a more 'template-friendly' structure before you
assign it. That way, you will not put the burden to cope with this on
your template designers (even if that's you yourself ;))
Greetings,
Ivo
- --
Ivo Jansch <ivo@ibuildings.nl>
ibuildings.nl BV - information technology
http://www.ibuildings.nl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDLqox95NUnGFZm9cRAhc5AKCqeUkCKm0zYigheSC201rB32Vs6QCfZ8Nc
OlL8jqygIWAdaEYwKNM4RYg=
=UIkx
-----END PGP SIGNATURE-----