How Do I round a number to its nearest thousand?
function round($var) { // Round it }
For positive integers:
function round($var) { return ($var + 500) / 1000 * 1000; }