strip
此功能使用单个空格或提供的字符串替换所有空格、新行和制表符。
基本用法
注意
如果您想取消模板文本的块,请使用内置
{strip}
函数。
示例
<?php
$smarty->assign('articleTitle', "Grandmother of\neight makes\t hole in one.");
$smarty->display('index.tpl');
模板为
将输出
此功能使用单个空格或提供的字符串替换所有空格、新行和制表符。
注意
如果您想取消模板文本的块,请使用内置
{strip}
函数。
<?php
$smarty->assign('articleTitle', "Grandmother of\neight makes\t hole in one.");
$smarty->display('index.tpl');
模板为
将输出