经测试代码如下:
/**
* 从字符串删除、替换不需要的字符
*
* @param
* @author 编程之家 jb51.cc jb51.cc
**/
function setDescriptionString($inputString=""){
$replacedWords = array("…","‘","ó","<ul>","<li>","–","…"," ",""","&","“","”","<span>","</span>","<p>","</p>","/",":","<",">","<strong>","</strong>","<b>","</b>","<i>","</i>","span","strong","class","+","-","=","'","’");
$filteredString = str_replace($replacedWords,"",$inputString).".";
return $filteredString;
}
/*** 代码来自编程之家 jb51.cc(jb51.cc) ***/
原文链接:https://www.f2er.com/php/529149.html