Nested Sections using previous array indice

From: Date: Thu, 23 Jan 2003 18:57:38 +0000
Subject: Nested Sections using previous array indice
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7316@lists.php.net to get a copy of this message
I don't know if this is a limitation of Smarty or it's just me, but this is my issue: I want to do a nested section something like this: {section name=loop loop=$first} <tr><td>{$first[loop].id}</td> {section name=loop2 loop=$second[loop]} <td>{$second[$first[loop].id][loop2].value}</td> {/section} </tr> {/section} Using the current id value from the first array according to [loop] as the first array indice in the second array. What I get back, however, is this: *Fatal error*: Smarty plugin error: [in test.tpl line xxx]: unknown tag - '$second[$first[loop].id][loop2].value' in */usr/local/Smarty-2.3.1/Smarty.class.php* on line *2005* Any ideas? I can work around this by rearranging my php so that I have a line like {$second[loop][loop2].value} but I was sort of hoping to do it this way, it's much cleaner. Thanks in advance!

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