Re: [SMARTY] Dynamic Variables

From: Date: Tue, 31 May 2005 22:07:54 +0000
Subject: Re: [SMARTY] Dynamic Variables
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12647@lists.php.net to get a copy of this message
I think I have found the solution by using backticks:
               {foreach name=digit_loop from=$digits item=digit}
                   {assign var=type_var_string value="page_key_$digit_type}
                                   {$page_obj->$type_var_string}
                  {/foreach}
.... Stephen J. Lawrence Jr. wrote:
Well, I have 12 different sets of variables on this page that I display in a form. The html is all identical except for the variable names. I am trying to keep from having to hardcode 12 different HTML TR's for each of the vars.


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