papaface Posted May 23, 2007 Share Posted May 23, 2007 Hello, Currently I am extracting a number from a mysql database. It is coming out as 4156 but how can i get it formatted so that it puts a , after the 4? 4,156 This record is dynamic so it is incremented all the time, so it will eventually get to something like 4324455 which should view as 4,324,455 How can I get this to work? Is there some function in PHP that does this? Quote Link to comment https://forums.phpfreaks.com/topic/52695-number-formatting/ Share on other sites More sharing options...
per1os Posted May 23, 2007 Share Posted May 23, 2007 www.php.net/number_format Quote Link to comment https://forums.phpfreaks.com/topic/52695-number-formatting/#findComment-260190 Share on other sites More sharing options...
Gmunky Posted May 23, 2007 Share Posted May 23, 2007 number_format($number); Quote Link to comment https://forums.phpfreaks.com/topic/52695-number-formatting/#findComment-260218 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.