Array ( [0] => P [1] => 4 ) ) ;数组中的4表示在下标4的位置上找到的。//第五个参数3表示,从下标为3的位置开始查找。//例:$str="精讲PHP";$ptn="/^[\\x7f-\\xff]+$/";if(preg_match($ptn,$str)){ echo "\"$str\":是中文";}else{ echo "\"$str\":不全是中文";}?>
本文共 202 字,大约阅读时间需要 1 分钟。
Array ( [0] => P [1] => 4 ) ) ;数组中的4表示在下标4的位置上找到的。//第五个参数3表示,从下标为3的位置开始查找。//例:$str="精讲PHP";$ptn="/^[\\x7f-\\xff]+$/";if(preg_match($ptn,$str)){ echo "\"$str\":是中文";}else{ echo "\"$str\":不全是中文";}?>
转载地址:http://ttxll.baihongyu.com/