一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

把全角数字转为半角数字

时间:2010-07-03 00:00:00 编辑:简简单单 来源:一聚教程网

  //

 代码如下复制代码
  function getalabnum($fnum)
  {
   $nums = array("0","1","2","3","4","5","6","7","8","9","+","-","%",".");
   $fnums = "0123456789+-%.";
   for($i=0;$i     if($nums[$i]==$fnum) return $fnums[$i];
   }
   return $fnum;
  }


  
  //实例应用
 

 代码如下复制代码
  echo getalabnum('6'); // 6

热门栏目