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 10/07/56 11:17

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

 

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

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