function NumToStr($num){ if (stripos($num,'e')===false) return $num; $num = trim(preg_replace('/[=\'"]/','',$num,1),'"');//出现科学计数法,还原成字符串 $result = ""; while ($num > 0){ $v = $num - floor($num / 10)*10; $num = floor($num / 10); $result = $v . $result; } return $result; }
希望本文所述对大家的PHP程序设计有所帮助。