nl2br[换行符替换成<br /> ]

nl2br[换行符替换成
> ]

test.php:
$smarty = new Smarty;
$smarty->assign('articleTitle', "今天预计晴天或下雨,今晚黑暗");
$smarty->display(' test.html');

test.html:
{$articleTitle|nl2br}

输出:
预计有阳光或下雨
今天,今晚黑暗

继续学习
||
<?php echo "nl2br[换行符替换成<br /> ]";
提交重置代码