100000000000000){ $n = $n / 1000; $x = "000"; } echo floor(($n / $m) / 1000) * 1000; echo $x; ?>