【发布时间】:2013-11-01 17:27:39
【问题描述】:
我想替换 PHP 中 <pre></pre> 标记之间的 <br /> 标记。
像这样:
$content = "Hello,<br /> <-- don't replace
Line 1<br /> <-- don't replace
Line 2<br /> <-- don't replace
<pre>Line 3<br /> <-- replace
Line 4</pre>";
我该怎么做?
【问题讨论】:
-
没有在 $content 中找到任何 pre 标签,或者您想替换
标签之间的 br 标签 -
@Simon911 用什么替换
? -
@Bigood:尝试to bring about the end of times?
-
糟糕,对不起,我的意思是 $content 中的 标签