开发者

Concatenate Smarty Variable with a String in tpl

I have assigned a smarty variable as such in my php file:

$smarty->assign('companyname', $_SESSION['companyname']);

How to mix regular html string with smarty variable?

I want to do something like:

<a href="/${companyname}/hello" class="mainMenu"/>

But the smarty template engine fails to evaluate properly the v开发者_开发百科ariable companyname


<a href="/{$companyname}/hello" class="mainMenu"/>

(note the shift of opening curly brace).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜