PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
What I want to do is, say I had any number between 0 and 1, I would want that number to be rounded up to 1, even if it was 0.1 which would technically be closer to 0.
I have tried the basic round() function but wouldn’t get it to do what I want, as it was rounding to the closest number (rounding 0.1 to 0 instead of 1 as I want).
I think what I am looking for is some kind of 'if it is more than 0 round it to 1 and if it is more than 1 round it to 2' and so on.
I would really appreciate it if anyone could help, the answer is probably much easier than I think.
Thanks for your reply, I had looked breifly at the manual and didn't see the ceil() function, thanks for pointing it out, it looks like it can do what im after.