$num=621;
echo round(round(621,-2));
4条回答 默认 最新
duangai1368 2019-07-16 21:15关注I think you are trying to round off a number to the nearest 100. Simply do this by using the ceil function.
ceil(621 / 100) * 100;You can use ceil function to round any number to its nearest number.
$number = ceil($inputNumber / $nearestNumber) * $nearestNumber;本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报