Re: [SMARTY] Réf. : Re: [SMARTY] SQL resul t array into section
| From: | Katana | Date: | Mon, 10 Feb 2003 08:51:48 +0000 |
| Subject: | Re: [SMARTY] Réf. : Re: [SMARTY] SQL resul t array into section | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7613@lists.php.net to get a copy of this message | ||
pmcic> I noticed a problem with Sections when the keys of
pmcic> the array are not in a sequence:
pmcic> if the keys are not 0, 1, 2, 3, 4, ...
pmcic> but 0, 1, 3, 4, ...
pmcic> Three will be a problem at printing.
pmcic> If you experience this, use foreach instead. But
pmcic> it's a shame section won't work properly in that
pmcic> case :-(
Section is not supposed to work correctly in this situation, it's just a for or while loop with
an integer incementation at each iteration. You can change the step, but if there is no sequence in
your keys, you have to use foreach.
Katana