每当我收到来自MS Outlook的电子邮件时,我都会收到此标签< o:p> &安培; nbsp; < / o:p> (没有空格)显示为?在<>。
中浏览器页面字符集编码是UTF-8,当我将其更改为ISO-8859-1时,符号消失但我的其他字符出错。我必须使用UTF-8
如何删除此标记序列。
PHP语言。将这些混乱存储在mysql中。
答案 0 :(得分:0)
如果要删除PHP中的内容,可以使用str_replace
$string = "<o:p> </o:p> and rest of string";
$searchedstring = "<o:p> </o:p>";
$string = str_replace($searchedstring,"",$string);
echo $string; (Output will be " and rest of string")
在这种情况下,您只需将搜索到的字符串替换为空,但也可以是其他内容。