/**
* 取出html標簽
*
* @access public
* @param string str
* @return string
*
*/
function deletehtml($str) {
$str = trim($str); //清除字符串兩邊的空格
$str = strip_tags($str
$str = preg_replace("/t/"
$str = preg_replace("/rn/"
$str = preg_replace("/r/"
$str = preg_replace("/n/"
$str = preg_replace("/ /"
$str = preg_replace("/ /"
return trim($str); //返回字符串
}
From:http://tw.wingwit.com/Article/program/PHP/201311/21178.html