mynamesleo Posted November 14, 2006 Share Posted November 14, 2006 Hi all,Trying to round a number to the next 10, example18 would = 2015 would = 2011 would = 209 would = 103 would = 10etc....Any simple ways to do this? Have checked out the round() but it seems I need more than this? Link to comment https://forums.phpfreaks.com/topic/27246-round-a-number/ Share on other sites More sharing options...
sasa Posted November 14, 2006 Share Posted November 14, 2006 $number = ceil($number / 10) * 10; Link to comment https://forums.phpfreaks.com/topic/27246-round-a-number/#findComment-124583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.