PHP之路 2014年10月10日 PHP去除浮点数后面多余的0 如: 5.1000 转化为5.1 6.00 转化为6 $str = 1.2200; echo rtrim(rtrim($str, ‘0’), ‘.’); Leave a comment InPHP杂记