funbinod Posted April 12, 2015 Share Posted April 12, 2015 hey guys! how can I always round up a number in php? I learnt about ROUND_HALF_UP, ROUND_HALF_DOWN, and others. but what can I do if I want to round a number always up whether it is greater than half or less than. for example 12345.01 = 12346 12345.99 = 12346 please guide me. thanks in advance.... Link to comment Share on other sites More sharing options...
Ingolme Posted April 12, 2015 Share Posted April 12, 2015 The ceil() function does that: http://php.net/ceil 1 Link to comment Share on other sites More sharing options...
funbinod Posted April 12, 2015 Author Share Posted April 12, 2015 uh ha! that's great! thank u! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now