Réf. : Re: [SMARTY] {section} problem with filter
| From: | philippe dot morange at ca-indosuez dot com | Date: | Fri, 17 Jan 2003 10:35:09 +0000 |
| Subject: | Réf. : Re: [SMARTY] {section} problem with filter | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7251@lists.php.net to get a copy of this message | ||
Thanks it works well with foreach.
So is there a bug in section, which is supposed to be more useful than foreach?
Cause {foreach} can display my array properly, and not {section}...
Well I can't remember exactly, but I hope I don't loop over several arrays, because now
I'll have to
change my sections to foreach loops.
Philippe.
Alex <lofa@forma.kharkov.ua> le 17/01/2003 10:48:52
Veuillez répondre à Alex <lofa@forma.kharkov.ua>
Pour : Philippe MORANGE/EST/DOSI/BANQUE_INDOSUEZ/FR@BANQUE INDOSUEZ
cc : smarty-general@lists.php.net (ccc : Philippe MORANGE/EST/DOSI/BANQUE_INDOSUEZ/FR)
Objet : Re: [SMARTY] {section} problem with filter
> I have an array that I set in PHP
> I filter this array with array_filter
> I display this array in Smarty, ---> But it is not displayed properly..
> The problem I think comes from the fact that that when I filter the array, some elements have
> been
> deleted, and so for exemple I may have $array[0] and $array[2], but $array[1] would have been
> deleted.
> Smarty will then display only $array[0] and stop after that...
You can use {debug} for track arrays content
and use
{foreach} {/foreach}
instead of
{section} {/section}
Alex.
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php