【发布时间】:2013-06-05 17:34:20
【问题描述】:
我有这个 html
<p>some text.</p>
<p><pre>
<?php sample();
$var = 'aaa';
?>
</pre></p>
<p>describe</p>
<p>
<pre>
<html>...</html>
</pre>
</p>
您会注意到<pre> 在<p> 中是错误的!
我想删除所有包含<pre> 不正常<p> 段落的<p>。
如何使用php纠正这个?
【问题讨论】:
标签: php html preg-replace preg-match preg-match-all