时间:2021-07-01 10:21:17 帮助过:3人阅读
function htmtocode($content) {
$content = str_replace("n", "<br>", str_replace(" ", " ", $content));
return $content;
}
先替换掉空格,再替换回车,相当于如下代码:
function htmtocode($content) {
$content = str_replace(" ", " ", $content);
$content = str_replace("n", "<br>",$content);
return $content;
//开源代码phpfensi.com
}