In Excel this is pretty simle - give it CEILING(31,4) and it spits out 32, since 32 is evenly divisible by 4. I've been trying to figure out an easy way to do this with PHP, but it doesn't seem like the ROUND, CEIL or FLOOR functions will offer much help. Am I wrong? If not ,can someone just point me in the right direction on how to accomplish this?

I apprecaite your help,

Nate

    You know, the problem with functions is that you forget that things can be done without them.

    How's this:

    11 / 4 = 2.75

    round(2.75) = 3

    3 x 4 = 12

    I am pretty sure that should work always...for 4, but just replace it and it should work for whatever...assuming the original number if greater than 1. Anyway, thanks for looking!

      Write a Reply...