今天在抓取页面中得到字符串:"卡牌 ",使用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删除。