php把全角数字转为半角数字
function getalabnum( $fnum ) { $nums = array ( "0" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "+" , "-" , "%" , "." ); $fnums = "0123456789+-%." ; for ( $i =0; $i < count ( $nums ); $i ++){ if ( $nums [ $i ]== $fnum ) return $fnums [ $i ]; } //开源代码phpfensi测试数据 return $fnum ; } //实例应用 echo getalabnum( '6' ); // 6查看更多关于php把全角数字转为半角数字 - php函数的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did30842