Re: Multi-dimension array in nested sections

From: Date: Fri, 29 Jun 2001 13:58:28 +0000
Subject: Re: Multi-dimension array in nested sections
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1090@lists.php.net to get a copy of this message
On Fri, 29 Jun 2001, Paul Bennett wrote: > I have tried the following in my template, but cannot access the value of > the 'matrix' key in the second (inner) section. > > {section name=sec1 loop=$str} > <TR><TD>{$str[sec1].time}</TD> > {section name=sec2 loop=7} > <TD>{%sec2.index%} - {$str[sec1].time[{%sec2.index%}].matrix}</TD> Try this: <TD>{%sec2.index%} - {$str[sec1].time[sec2].matrix}</TD> -Andrei "Computers are useless. They can only give you answers." --Pablo Picasso

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