";print_r($arr);echo "";
}$a = "river crab) (socialafeowa#$%^!@"/>
";print_r($arr);echo "";
}$a = "river crab) (socialafeowa#$%^!@">
Home >Backend Development >PHP Tutorial >PHP remove Chinese characters from string 一The Chinese, delete a Chinese Chinese in the Chinese, as long as the Chinese characters are replaced in a regular way as an empty character:
PHP remove Chinese characters from string
<?php
header('Content-type:text/html;charset=utf-8');
function p($arr){
echo "<pre class="brush:php;toolbar:false">";
print_r($arr);
echo "
";
}
$a = "河蟹)(社会afeowa#$%^!@@#zf吃饭fawgwea汉堡包agho_iawghowi我日)";
$result = preg_replace('/([\x80-\xff]*)/i','',$a);
p($result);
?>
The above introduces PHP to remove Chinese characters from strings, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials. Related articles
See more