PHP explode空格无效的解决办法
当php通过file_get_contents 获取html页面内容时,对于html的空格 无法用exlpode(" ",$content);转换成功,可以使用一下方法转换
$content = preg_replace("/(\s|\ \;| |\xc2\xa0)/"," ",$content);
当php通过file_get_contents 获取html页面内容时,对于html的空格 无法用exlpode(" ",$content);转换成功,可以使用一下方法转换
$content = preg_replace("/(\s|\ \;| |\xc2\xa0)/"," ",$content);