全角数字を半角数字に変換する
- //全角数字を半角数字に変換
-
- function GetAlabNum($fnum){
- $nums = array("0","1","2","3", "4" ,"5","6","7","8","9");
- //OSPHP.com.CN
- $fnums = "0123456789"
- for($i=0;$ i$fnum = ereg_replace("[^0-9 .]| ^0{1,}","",$fnum);
- if($fnum=="") $fnum=0;
- return $fnum;
- }
- ?>
コードをコピーします
|