Re: [SMARTY-GENERAL] Another Array-Loop-Question

From: Date: Tue, 09 Apr 2002 12:49:53 +0000
Subject: Re: [SMARTY-GENERAL] Another Array-Loop-Question
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3575@lists.php.net to get a copy of this message
AFAIK, {foreach} cannot handle nested arrays and $CATS was of this type. ----- Original Message ----- From: "Gabor Hojtsy" <goba@php.net> To: "Papp, Gyozo" <pgerzson@freestart.hu>; "Jones Down" <jones.down@gmx.net> Cc: <smarty-general@lists.php.net> Sent: Tuesday, April 09, 2002 2:12 PM Subject: Re: [SMARTY-GENERAL] Another Array-Loop-Question | > or you may use "array_values()" in the template like: | > | > {assign var="CATS" values=$CATS|@array_values} | > {section ....} | > | > The main goal of this solution is that you either | > can benefit from custom keyed array within PHP scripts, | > and can be easily looped by Smarty, too. | > | > IMHO, it is not a good thing that Smarty cannot handled | > non consecutive indices. | | Smarty can handle them with {foreach}, but it has limited | functionality, then section... | | Goba | |

« previous php.smarty.general (#3575) next »