Using complex variables in {foreach from="$var.element"} etc.
| From: | Dmitry Koteroff | Date: | Sun, 01 Aug 2004 20:38:19 +0000 |
| Subject: | Using complex variables in {foreach from="$var.element"} etc. | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2511@lists.php.net to get a copy of this message | ||
Hello.
{foreach from="$array.elements"}...{/foreach}
does not work. Compiled code is
if (count($_from = (array)($this->_tpl_vars['array']).".elements")): foreach
($_from...
instead of
if (count($_from = (array)($this->_tpl_vars['array']["elements"]))): foreach
($_from...
All other tags work the same manner (including assign).
The question is - how could I extract any element from array, in
any function (not only foreach and insert)?
Seems it is impossible at all? :-(
--
Best regards,
Dmitry Koteroff.