dereferencing an array within {section}
| From: | Travis Low | Date: | Tue, 13 Aug 2002 03:14:13 +0000 |
| Subject: | dereferencing an array within {section} | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5660@lists.php.net to get a copy of this message | ||
Suppose I have an associative array whose elements are also associative arrays. When iterating through it within a {section}, can those internal arrays be dereferenced with an arbitrary Smarty variable? For example:
PHP:
$smarty->assign( "some_array", $compound_array );
$smarty->assign( "some_index", $foo );
Template (pseudocode -- doesn't work):
{section name="element" loop=$some_array}
<h1>{$some_array[element][$some_index]}</h1>
{/section}
I've tried a variety of syntaxes, but nothing seems to work.
cheers,
Travis
--
Travis Low
<mailto:travis@dawnstar.org>
<http://dawnstar.org/travis>