passing an array to an included template
| From: | Jens Lehmann | Date: | Mon, 29 Apr 2002 14:16:20 +0000 |
| Subject: | passing an array to an included template | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-3924@lists.php.net to get a copy of this message | ||
I want to do something like the following statement:
{include file="foo.tpl" some_array = array('foo1','foo2') }
It doesn't work to pass an array to the included template
this way because the compiled template will loke like:
$this->_smarty_include("foo.tpl", array( 'some_array' =>
"array('foo1','foo2')" ) );
Is there an other possibilty for achieving this? I can't
declare the array in my PHP-Code.
By the way: How can I see which variables are known
in an included template? The Debug-Console imho doesn't show
this by default.
Jens