开发者

Custom Smarty functions

开发者 https://www.devze.com 2023-01-27 20:03 出处:网络
In Smarty i want to be able to write {widget 15} or {widget id=15} , so the output will be the return value of PHP function

In Smarty i want to be able to write {widget 15} or {widget id=15} , so the output will be the return value of PHP function

function widget($id){开发者_StackOverflow
    echo 'hi '.$id;
}

is it possible ?


Smarty allows you to create such custom functions easily: see the official reference.

0

精彩评论

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

关注公众号