Re: AW: [PEAR] sections and associative arrays

From: Date: Fri, 19 Dec 2003 10:04:47 +0000
Subject: Re: AW: [PEAR] sections and associative arrays
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9703@lists.php.net to get a copy of this message
Oh sorry. I'll post my answer on the smarty-list. thx alexander gabriel On 19 Dez 2003, you wrote in php.pear.general: > Hi, > > This ist the wrong mailing list. Smarty has ist own. > > Nevertheless yout second example is not really ok. > You must set a variable in the loop of the second section (e.g. > loop=$MyValues[MyRow].ID ) > > > Andreas Otterstein > > > -----Ursprüngliche Nachricht----- > Von: Alexander Gabriel [mailto:alexander.gabriel@blubbermania.com] > Gesendet: Freitag, 19. Dezember 2003 10:33 > An: pear-general@lists.php.net > Betreff: [PEAR] sections and associative arrays > > > Hi group, > > i've got a problem with an associative array. > > if i'm doing: > > [code] > <table> > {section name=MyRow loop=$MyValues} > <tr> > <td>{$MyValues[MyRow].ID}: > {$MyValues[MyRow].Bezeichnung}</td> > </tr> > {/section} > </table> > [/code] > > i get a table with the values 'ID' and 'Bezeichnung' from my > SQL-result. > > > according to the documentation chapter 7, exapmle 19, this should work > too: > > [code] > <table> > {section name=MyRow loop=$MyValues} > <tr> > {section name=MyColumn loop=$MyValues[MyRow]} > <td>{$MyValues[MyRow][MyColumn]}</td> > {/section} > </tr> > {/section} > </table> > [/code] > > but all i get is the same table as above but without any values. > > I'm new to Smarty and maybe this is just a beginners mistake. would be > really nice if you could help me. > > thx > Alexander Gabriel >

« previous php.pear.general (#9703) next »