literal function

literal function:

Literal The data in the label area will be treated as text, and the template will ignore all characters inside it. Information.

This feature is used to display javascript that may contain character information such as braces. Script.

can also be used to output braces when {} is forced to be interpreted.

When this information is in {literal}{/literal } tag, the template engine will not analyze them and display them directly.

eg1:

{foreach from=$custid item= curr_id}
id: {$curr_id}

{/foreach}

Output:

微信图片_20180313102155.png

eg2:

##{literal}{foreach from=$custid item=curr_id}
id: {$curr_id}

{/foreach}
{/literal}

Output:

微信图片_20180313102044.png



Continuing Learning
||
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!