PHP’s number_format()
can’t take a
as a separator, which is bad when you want the separator to be whitespace inside HTML, since using a normal blank (a ” “) breaks the number when it happens to be laid out between to lines.
Svein Tjonndal has written the following little function which essentially does a number_format
with
as the thousands separator:
function numberfix($number) { $number = number_format($number,0,","," "); return str_replace(" ", " ", $number); }