// How to round to nearest Thousand?
function round($var) {
return round( ($var + 500) / 1000 * 1000 );
}
// or
$x = round ($x, -3);
// +500 For positive integers
// -500 For negative
// http://stackoverflow.com/questions/5150001/how-to-round-to-nearest-thousand