如问题中所述,我正在尝试使用 PHP 从 MySQL 的文本字段中读取数据来生成 XML 输出(用于 iPhone 应用程序)。
每当字段中有水平省略号字符时... XML 生成不正确。
我已经尝试了几种方法来逃避它,如下所示,但似乎没有一种工作......
$row['detail'] = str_replace("&", "&", $row['detail']);
$row['detail'] = str_replace("…", "…", $row['detail']); //<-- prob is here
$row['detail'] = str_replace("<", "<", $row['detail']);
$row['detail'] = str_replace("\'", "'", $row['detail']);
$row['detail'] = str_replace(">", ">", $row['detail']);
$row['detail'] = str_replace("\"", """, $row['detail']);
我基本上有2个问题,
如何处理水平省略号字符?
是否还有更多可能导致此类问题的字符?对此列表及其解决方案的任何引用都会很棒!
谢谢