Hi every one after long time I come back on my blog,
Here some example to display PHP variable on Smarty template (.tpl) file:
1. Simple variable
{$variablename}
2. For count array
{count($arrayVariable)}
3. For if condition
{ if $variable==1}......{/if}
4. For foreach loop on template file
{ foreach $res as $key}
{$key.id}
{$key.name}
{/foreach}
Enjoy!
No comments:
Post a Comment