Tandem Posted July 16, 2006 Share Posted July 16, 2006 Ok, i'm mysql_query()'ing and then mysql_result()'ing, so that i can print values from my database onto my site. One of these is an integer. I want there to be commas in the integer if possible. For example: instead of 1000000 - it would be 1,000,000.Is this possible? if so how?Thanks in advance.-Tandem Link to comment https://forums.phpfreaks.com/topic/14739-commas-in-numbers/ Share on other sites More sharing options...
willfitch Posted July 16, 2006 Share Posted July 16, 2006 There are a couple of ways to do this:Using SQL SELECT FORMAT(field_name)or PHP:number_format($int) Link to comment https://forums.phpfreaks.com/topic/14739-commas-in-numbers/#findComment-58821 Share on other sites More sharing options...
Tandem Posted July 16, 2006 Author Share Posted July 16, 2006 Awesome, I couldn't have asked for btter help!Thankyou. Link to comment https://forums.phpfreaks.com/topic/14739-commas-in-numbers/#findComment-58822 Share on other sites More sharing options...
Recommended Posts