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? 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 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); Link to comment https://forums.phpfreaks.com/topic/52695-number-formatting/#findComment-260218 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.