今天在抓取頁面中得到字符串:"卡牌 ",使用str_replace 、 preg_replace 和 strip_tags過濾都無解。
最后google到2種方式,如下:
str_replace(chr('0xC2') . chr('0xA0'),'', trim($typeValue)); 或 str_replace(' ','', htmlentities(trim($typeValue)));
今天在抓取頁面中得到字符串:"卡牌 ",使用str_replace 、 preg_replace 和 strip_tags過濾都無解。
最后google到2種方式,如下:
str_replace(chr('0xC2') . chr('0xA0'),'', trim($typeValue)); 或 str_replace(' ','', htmlentities(trim($typeValue)));
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。