<p>
<a href="url" ref="external nofollow" target="_blank">
<img class="aligncenter" src="url">
</a>
</p>
要求刪除p>A標(biāo)簽,但保留里邊的img
感謝感謝
自己解決了,
preg_replace("#<p><a[^>]*>(.*?)</a>#is", "$1", $ss);
只有一位朋友回答,雖然不是PHP的,但也采納了,關(guān)貼!
- 1 回答
- 0 關(guān)注
- 373 瀏覽
添加回答
舉報
0/150
提交
取消