If you want to round a floating point number to the nearest multiple of
some number n, use the following trick:
$rounded = round($number /
n) * n
For example, to round 12874.49 to the nearest 100-multiple
(i.e. 12900), use
$rounded = round($number / 100) * 100
Use
ceil() or floor() if you want to round down/up.