Reply to Re: Can I use smarty variable inside {php} ?

Your name:

Reply:


Posted by iktorn on 04/24/07 16:10

Man-wai Chang napisał(a):
>
> I meant something like:
>
> {section name=j start=0 loop=10 step=1}
> {php} $xx={$smarty.section.j.index}; echo $xx; {/php}
> {/section}
>

In my opinion it's pointless. You should separate your code and templates.

If you need to do something that depends on smarty variables - better
way is to write some custom funtion (plugin) that takes
{$smarty.section.j.index} as an argument (for example).

--
Wiktor Walc
http://phpfreelancer.net

[Back to original 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

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