Hello,
I want to show show float and int values with comma in mysql database.
Like if i enter 1000 or 1000.00 it should take it as 1,000 or 1,000.00
is there any way to do this?
thank you
mysql comma issue
Moderator: General Moderators
http://bg.php.net/function.number_format
output:
http://dev.mysql.com/doc/refman/5.0/en/ ... ion_format
Code: Select all
echo number_format(12345678.12345, 2, '.', ',');
echo number_format(12345678, 2, '.', ',');PS: Also, you can do this at DB layer:12,345,678.12
12,345,678.00
http://dev.mysql.com/doc/refman/5.0/en/ ... ion_format
There are 10 types of people in this world, those who understand binary and those who don't