php 清理富文本区域以显示干净的字符串

php clean up rich textarea to display clean string

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

<p> HI there </p>

问题是当我使用 preg_rplace 移动时,我得到如下输出:

p Hi there p

有人知道如何正确执行此操作吗?

这好像是为你量身定做的

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