//將全角數字轉換成半角數字
function GetAlabNum($fnum){
$nums = array('0','1','2','3','4','1','2','3','4',']' ,'6','7','8','9','. ','-','+',':');
$fnums = array('0','1', '2','3', '4','5', '6', '7','8', '9','.', '-', '+',':');
$fnlen = count($fnums);
for($i=0;$i $slen = strlen($fnum);
$oknum = '';
($fnum[$i]) > 0x80) $i++;
else $oknum .= $fnum[$i]; return $oknum;
}
以上就介紹了php程式碼 php程式碼把全角數字轉換成半角數字,包含了php程式碼的內容,希望對PHP教學有興趣的朋友有幫助。