欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php替換超長文本中的特殊字符的函數(shù)代碼

 更新時(shí)間:2012年05月22日 16:11:41   作者:  
php替換超長文本中的特殊字符的函數(shù),主要就是通過str_replace實(shí)現(xiàn)字符的簡單體會
復(fù)制代碼 代碼如下:

function unhtml($content){
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"<br>",$content);
$content=str_replace(chr(32),"<br>",$content);
$content=str_replace("[_[","<",$content);
$content=str_relace(")_)",">",$content);
$content=str_replace("|_|","",$content);
rerurn trim($content);
}


PHP str_replace() 函數(shù)

定義和用法
str_replace() 函數(shù)使用一個(gè)字符串替換字符串中的另一些字符。

語法
str_replace(find,replace,string,count)
參數(shù) 描述
find 必需。規(guī)定要查找的值。
replace 必需。規(guī)定替換 find 中的值的值。
string 必需。規(guī)定被搜索的字符串。
count 可選。一個(gè)變量,對替換數(shù)進(jìn)行計(jì)數(shù)。

相關(guān)文章

最新評論