使用php剥离html标签(Stripping html tags using php)
除了pre标签内的内容之外,我如何去除html标签
码
$content=" <div id="wrapper"> Notes </div> <pre> <div id="loginfos">asdasd</div> </pre> ";
使用strip_tags($ content,'')时,pre标签内的html也被剥离了。 但我不希望html里面被剥离
How can i strip html tag except the content inside the pre tag
code
$content=" <div id="wrapper"> Notes </div> <pre> <div id="loginfos">asdasd</div> </pre> ";
While using strip_tags($content,'') the html inside the pre tag too stripped of. but i don't want the html inside pre stripped off
原文:https://stackoverflow.com/questions/4395868
更新时间:2023-10-27 12:10