<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_62527"> <div class="blockcode"> <div id="code_KjS"><ol> <li>//把全角数字转为半角数字 </li> <li> </li> <li>function GetAlabNum($fnum){ </li> <li>$nums = array("0","1","2","3","4","5","6","7","8","9");</li> <li>//OSPHP.com.CN</li> <li>$fnums = "0123456789"; </li> <li> for($i=0;$i$fnum = ereg_replace("[^0-9.]|^0{1,}","",$fnum); </li> <li> if($fnum=="") $fnum=0; </li> <li> return $fnum; </li> <li>} </li> <li>?></li> </ol></div> <em onclick="copycode($('code_KjS'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> PHP</div> <div id="comment_62527" class="cm"> </div> <div id="post_rate_div_62527"></div> <br><br>