Vmi90 Posted November 27, 2006 Share Posted November 27, 2006 Whats the code to round a variable to the nearest whole number? Link to comment https://forums.phpfreaks.com/topic/28592-rounding-numbers/ Share on other sites More sharing options...
Hypnos Posted November 27, 2006 Share Posted November 27, 2006 round() Link to comment https://forums.phpfreaks.com/topic/28592-rounding-numbers/#findComment-130829 Share on other sites More sharing options...
JasonLewis Posted November 27, 2006 Share Posted November 27, 2006 there is more then just round(). round will do it but there are others, like ceil() and floor().ceil() rounds up to the nearest whole number whilst floor() rounds down to the nearest whole number.visit these:http://au.php.net/roundhttp://au.php.net/ceilhttp://au.php.net/floor Link to comment https://forums.phpfreaks.com/topic/28592-rounding-numbers/#findComment-130848 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.