Smarty comes with several custom functions that you can
use in the templates.
assign
assign is used for assigning template variables during the execution
of the template.
在樣板執行的期間我們可以使用 assign 指定樣板參數。
Example 8-1. assign {assign var="name" value="Bob"}
The value of $name is {$name}.
OUTPUT:
The value of $name is Bob. |
|