Sunamena Posted January 29, 2017 Share Posted January 29, 2017 How to make a number, in this case: 1500123.26441 to be displayed as 1.500.123,26 by using php? Code: echo $number; I did not realy know how to google this question, so i thought to ask it here. Thanks in advance =D Link to comment Share on other sites More sharing options...
Ingolme Posted January 29, 2017 Share Posted January 29, 2017 The number_format() function is used for that: http://php.net/number_format Here's an example: echo number_format(1500123.26441, 2, ',', '.'); Link to comment Share on other sites More sharing options...
Sunamena Posted January 29, 2017 Author Share Posted January 29, 2017 That works! Thankyou very much! =D Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now