php清理丰富的textarea来显示干净的字符串

问题描述:

I'm trying to clean up a string from a rich textarea. The string is something like:

<p> HI there </p>

The problem is when i use preg_rplace to romove i get an output like:

p Hi there p

Anyone knows how to do this correctly?

我正在尝试从富文本区域清理字符串。 该字符串类似于: p>

 &lt; p&gt;  HI那里&lt; / p&gt; 
  code>  pre> 
 
 

问题是当我使用preg_rplace来获取输出时,我得到一个输出: p>

   p你好p 
  code>  pre> 
 
 

任何人都知道如何正确地做到这一点? p> div>

This seems like it was made for you

http://php.net/manual/en/function.strip-tags.php