Jump to content

Thousand separator


AndieB

Recommended Posts

[!--quoteo(post=364618:date=Apr 13 2006, 05:52 PM:name=Barand)--][div class=\'quotetop\']QUOTE(Barand @ Apr 13 2006, 05:52 PM) [snapback]364618[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]$n = 12345.67;

echo number_format ($n, 2);[/code]

--> 12,345.67
[/quote]Thanks...
Link to comment
https://forums.phpfreaks.com/topic/7335-thousand-separator/#findComment-27006
Share on other sites

Follow-Up question:


In Sweden we tend to use the , (comma) as a separator for decimals. I've noticed that PHP will not accept me doing a calculation using the comman (,) sign. (ie 30000 * 1,25), I must do this (30000 * 1.25).

Is this something one can change or do I have to live with it?


Thanks 4 any kind of help!

--Andreas
Link to comment
https://forums.phpfreaks.com/topic/7335-thousand-separator/#findComment-27409
Share on other sites

[!--quoteo(post=365241:date=Apr 16 2006, 08:34 AM:name=AndieB)--][div class=\'quotetop\']QUOTE(AndieB @ Apr 16 2006, 08:34 AM) [snapback]365241[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Follow-Up question:
In Sweden we tend to use the , (comma) as a separator for decimals. I've noticed that PHP will not accept me doing a calculation using the comman (,) sign. (ie 30000 * 1,25), I must do this (30000 * 1.25).

Is this something one can change or do I have to live with it?
Thanks 4 any kind of help!

--Andreas
[/quote]

as far as i know, you have to live with it, just like all us non-americans have to get used to spelling the word 'colour' without the 'u' :)
Link to comment
https://forums.phpfreaks.com/topic/7335-thousand-separator/#findComment-27418
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.