I want to know how to write php syntax in smarty template(.tpl).
For example I'm using below php syntax in Pure Codeigniter(No Smarty include) and it's working perfectly.
<?= isset($value) ? $value['phone'] : '' ?>
But in Smarty, It's not work. How should write this? Please suggest me.
Try this:
{if isset($value)}
$value['phone']
{/if}
years ago I used:
{php}
// php code
{/php}
Nowadays I don't know if it still works
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.