木一 发表于 2017-4-7 08:52:03

php保留两位小数但不四舍五入

<?php
$s = '1.339';
$s1 = ((int)($s*100) / 100);
print_r($s1);
页: [1]
查看完整版本: php保留两位小数但不四舍五入