PHP全角标点转为半角

<?php
$str="0123ABCDFWS\",.?<>{}[]*&^%#@!~()+-|:;";
echo"$str";
echo"<br />";
$str=preg_replace('/\xa3([\xa1-\xfe])/e','chr(ord(\1)-0x80)',$str);
echo$str;
?>

本文永久地址:https://sjolzy.cn/Half-width-full-width-punctuation-into-PHP.html

--EOF--

标签: php, echo

随机文章

添加新评论