欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php去除html标签代码

程序员文章站 2022-04-09 12:14:47
...
  1. function Text2Html($txt){
  2. $txt = str_replace(" "," ",$txt);
  3. $txt = str_replace(" $txt = str_replace(">",">",$txt);
  4. $txt = preg_replace("/[rn]{1,}/isU","
  5. rn",$txt);
  6. return $txt;
  7. }
  8. ?>
复制代码

php, html