php中float转int的方法
使用round(x,prec)方法
<?php echo(round(0.60)); echo(round(0.50)); echo(round(0.49)); echo(round(-4.40)); echo(round(-4.60)); 输出: 1 1 0 -4 -5
推荐教程: 《php教程》
以上就是php中float转int的方法的详细内容!
查看更多关于php中float转int的方法的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did55543