2009-12-23 86 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") 

在这种情况下,你只是没有替换搜索字符串,但它也可以是别的东西。

相关问题