php去除html标签代码
php去除html标签代码 如下代码实现去除HTML标记 :```phplt;? function Text2Html($txt){ $txt = str_replace(quot; quot;,quot; quot;,$txt); $txt = str_replace(quot;lt;quot;,quot;amp;lt;quot;,$txt); $txt = str_replac
如下代码实现去除HTML标记 :
<? function Text2Html($txt){ $txt = str_replace(" "," ",$txt); $txt = str_replace("<","<",$txt); $txt = str_replace(">",">",$txt); $txt = preg_replace("/[rn]{1,}/isU"," rn",$txt); return $txt; } ?>
- 上一篇:php在线生成icon图标类
- 下一篇:php判断邮箱Email地址是否合法方法
精彩图集
精彩文章