摘要: 第一种: 使用floatval() 第二种: rtrim(rtrim($str, '0'), '.'); 比如$str=2.360000; 最后会输出2.36 第三种使用正则: /** * 去除多余的0 */ function del0($s) { $s = trim(strval($s)); if 阅读全文
posted @ 2020-05-18 18:22 牛奔 阅读(2562) 评论(0) 推荐(0) 编辑