Search Webmaster Help and Solution

[RESOLVED] rounding numbers up to the nearest dividable by 4

hi guys

any ideas how to round the number to the nearest number dividable by some other number ? ( ) so for example:

PHP Code: $number = 6;

if($number % 4 == 0) { echo(ok); }
else { }
and here i want to round that number up to nearest dividable by 4, so in this case: 8.

any ideas appreciated hi guys

any ideas how to round the number to the nearest number dividable by some other number ? ( ) so for example:

PHP Code: $number = 6;

if($number % 4 == 0) { echo(ok); }
else { }
and here i want to round that number up to nearest dividable by 4, so in this case: 8.

any ideas appreciated

View Complete Thread with Replies

Related Items

Query failed: connection to localhost:3354 failed (errno=111, msg=Connection refused).