Using complex variables in {foreach from="$var.element"} etc.

[email protected] (Dmitry Koteroff)
Newsgroups php.smarty.dev
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.