$numval = 12345.50;
Desired output:
12 345,50
The comma instead of a dot is not a problem but how can I get the thousands separator to be a white-space?
I noticed PHP money format with spaces but this is not a duplicate post. Using number_format
is out of question as it rounds the input value. I can't allow the values passed through it to be rounded at all.
Is there a built-in way to do exactly what number_format()
does, but without rounding the value or do I have to write my own function to do this?