为了正确解析双引号字符串(我无法更改),我必须执行以下操作:
$string = '15 Rose Avenue\n Irlam\n Manchester';
$string = str_replace('\n', "\n", $string);
print nl2br($string); // demonstrates that the \n's are now linebreak characters
到目前为止,一切都很好。但是在给定的字符串中,有类似的字符\xC3\xA4
。有很多这样的字符(以\ x开头。)如何正确地解析它们,如上所示,使用换行符?
您可以使用
$str = stripcslashes($str);
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句