Re: [SMARTY] Dynamic Variables

From: Date: Tue, 31 May 2005 20:12:36 +0000
Subject: Re: [SMARTY] Dynamic Variables
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12646@lists.php.net to get a copy of this message
No, I think you did not understand my question. In a nutshell: I have something like {$my_obj->variable_1_value} in my template. I want to put that in a loop so that the _1_ part is replaced with values from an array, so the second time through, it would display: {$my_obj->variable_2_value}, etc.. I tried doing this but it did not work: {foreach ....} {$my_obj->variable_.$array_item._value} {/foreach} and also tried: {foreach ...} {$my_obj->variable_| cat: $array_item| cat: "_value"} {/foreach} Bill Cunningham wrote:
Stephen, I think you are looking for: {html_options ... } Take a look at this link: http://www.phpfreaks.com/smarty_manual/page/language.function.html.options.html - Bill


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