<?
$qian=array(" "," ","t","n","r");
$hou=array("","","","","");
$smalltext=str_replace($qian,$hou,$navinfor[smalltext]);
echo $smalltext;
?>
二,列表模板过滤smalltext简介中的空格、换行:
1,列表内容模板(list.var)右侧,勾选“使用程序代码”
2,采用以下代码:
$r[smalltext]=str_replace(array("rn"," "," ", "r", "n", "<br/>", "</p>","”","“"),"",str_replace("<p>","",$r[smalltext]));
$listtemp='<li>
<p><a href="[!--titleurl--]" target="_blank">[!--title--]</a><span>[!--newstime--]</span></p>
<p>[!--smalltext--]</p>
</li>';
注意正确写法:/r/n,斜杠本站不知道为什么不显示