use php functions round() to round up or floor() to round down. generic code, based on examples to round to nearest nickel (5c), dime (10c) and quarter (25c):$x = 100 / $cents_to_round_to;$round_up = number_format(round($number * $x) / $x, 2);$…
more »