Re: [SMARTY] dynamic var

From: Date: Tue, 19 Aug 2003 11:39:34 +0000
Subject: Re: [SMARTY] dynamic var
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10095@lists.php.net to get a copy of this message
At 13:09 19.08.2003 +0200, you wrote:
{foreach from=$contents item="c"}
        {$c.content_$language}
{/foreach} to my knowledge there is no direct syntax for this, you have to assign an intermediate value: {foreach from=$contents item="c"}
    {assign var=content_language value="content_$language"}{$c.$content_language}
{/foreach}
Oh, I thought there was some way to do it without assigning a var. Thanks anyway :-) Martin. Martin Kloss martin.kloss@triquart.de Technische Direktion ************************ Triquart Neue Medien Bellealliancestr.17 20259 Hamburg Germany Tel.+49 (40)432 923-0 Fax +49 (40)432 923-23 www.triquart.de www.triquart-humor.de ************************* "Lingo objektorientiert" Das Buch zum Autor jetzt bestellen unter: http://www.amazon.de/exec/obidos/ASIN/3898422194/lingmmugd

« previous php.smarty.general (#10095) next »