Question

I need to round any non-integers up to the nearest integer, regardless of whether the number after the decimal place is >5 or not.

Was it helpful?

Solution

You can make use of the ceil($value) function in PHP to round up.

Similarly you can make use of floor() for rounding down.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top