Re: [SMARTY] Smarty, associative arrays and underscores not playing nicely

From: Date: Sat, 11 Oct 2003 17:12:02 +0000
Subject: Re: [SMARTY] Smarty, associative arrays and underscores not playing nicely
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10341@lists.php.net to get a copy of this message
On Saturday 11 Oct 2003 17:48, Duncan Hill wrote: > On Saturday 11 Oct 2003 17:45, Monte Ohrt wrote: > > Duncan Hill wrote: > > >Still can't get sections to work with non-numeric indices though, and > > > that's a critical sticking point for me right now. > > > > {section} expects numeric indices. try {foreach} instead. > > Oh.. yay. I must be really code-blind, because the manual I have says > nothing at all about that. Ahh, it's just -barely- hinted at with the part > about start and step, but there's no explicit declaration that section > requires a numeric index. Oh well, live and learn. Thanks all who responded. I ended up using a php foreach to re-index my two arrays to the same numeric indices (they shared a common string index), and am using a section quite happily now.

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