php数字操作

保留2位小数

round($n, 2)
number_format($n, 2)
printf('%0.2f', 0.5655)

都会四舍五入。

posted on 2021-01-04 15:29  aworkstory  阅读(66)  评论(0编辑  收藏  举报

导航