Re: [SMARTY] {section} with array that doesnt start with index 0

From: Date: Mon, 19 Aug 2002 07:42:56 +0000
Subject: Re: [SMARTY] {section} with array that doesnt start with index 0
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5752@lists.php.net to get a copy of this message
> From: "Peter Billen" <peter@clueless.be> > To: "'Smarty General'" <smarty-general@lists.php.net> > Date: Sun, 18 Aug 2002 22:45:35 +0200 > Subject: RE: [SMARTY] {section} with array that doesnt start with index 0 > However, this problem made me wondering about how to construct an array > to use with Smarty. Is it a good idea to take primary keys as indices? absolutely no. it's just-so as long as you can keep you hands on both the code and the templates, but as soon as these two are truly separated, you either must document the {section} breakage with associative (or non-zero-based) arrays for the template authors, or use array_values() everywhere. -- FreeBSD 4.6-STABLE 9:40AM up 9 days, 21:35, 19 users, load averages: 0.00, 0.00, 0.00

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