2009-12-23 88 views
1

每當我收到來自MS Outlook的電子郵件時,我都會得到這個標籤< o:p> & nbsp; </o:p>(沒有空格)顯示爲?在<>中。<o:p>  </o:p>< o : p >&nbsp;</o : p >顯示錯誤

瀏覽器頁面字符集編碼是UTF-8,當我將其更改爲ISO-8859-1時,符號消失但我的其他字符出錯。我必須使用UTF-8

我該如何刪除這個標籤序列。

PHP語言。將混亂存儲在mysql中。

回答

0

如果你想在PHP中刪除的東西,你可以使用str_replace函數

$string = "<o:p>&nbsp;</o:p> and rest of string"; 
$searchedstring = "<o:p>&nbsp;</o:p>"; 
$string = str_replace($searchedstring,"",$string); 
echo $string; (Output will be " and rest of string") 

在這種情況下,你只是沒有替換搜索字符串,但它也可以是別的東西。

相關問題