[转载]PHP 字符串替换中文

$a = "Car 神";
$result = preg_replace('/([\x80-\xff]*)/i','',$a);
var_dump($result);

参考链接:php字符串去掉中文

posted @ 2016-01-28 18:54  五毛钱的饼  阅读(249)  评论(0编辑  收藏  举报