[prev in list] [next in list] [prev in thread] [next in thread]
List: smarty-dev
Subject: Re: [SMARTY-DEV] Using complex variables in {foreach from="$var.element"} etc.
From: messju mohr <messju () lammfellpuschen ! de>
Date: 2004-08-01 20:45:45
Message-ID: 20040801204545.GA14335 () pharao ! serveftp ! org
[Download RAW message or body]
On Mon, Aug 02, 2004 at 12:38:19AM +0400, Dmitry Koteroff wrote:
> 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)?
just omit the quotes.
like: {foreach from=$array.elements ...} ... {/foreach}
HTH
messju
> Seems it is impossible at all? :-(
>
> --
> Best regards,
> Dmitry Koteroff.
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic