文章提供的这个PHP 把科学计数法转换为原始数字字符串函数非常的好用,希望能帮助到各位朋友吧,代码如下:
- 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;
- }
|