Reputation: 83254
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 variable companyname
Upvotes: 1
Views: 6503
Reputation: 143071
<a href="/{$companyname}/hello" class="mainMenu"/>
(note the shift of opening curly brace).
Upvotes: 3