php去除html标签

function cutstr_html($string){  

    $string = strip_tags($string);  

   $string = preg_replace([
"\t", "\r\n", "\r", "\n", " "], [], $string);

   return trim($string);
}

 

posted @ 2019-09-02 22:44  study_php_java_C++  阅读(6498)  评论(0编辑  收藏  举报