You are here: Re: [SMARTY] Dynamic Variables « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] Dynamic Variables

Posted by "Stephen J. Lawrence Jr." on 09/30/74 11:17

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.
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация