| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Senior Member | Splitting thousands Hi, Just wondering if there was a function (pre-built in to PHP , or created) that split thousands by ','s; eg 100000 would be 100,000 950000000 would turn into 950,000,000 I think you get the idea. So is there one that exists? Thanks, TM
__________________ You design in photoshop, I code into valid XHTML/CSS. Professional PSD, PNG or HTML to tableless XHTML/CSS designs. For more info, send me a PM. |
| |
| | #2 (permalink) |
| Buy my domains. | PHP Code: It reverses the $number and adds a comma after every 3, then reverses it back. Last edited by Dan Friedman; 05-17-2006 at 11:45 AM. |
| |
| | #3 (permalink) |
| Senior Member | Thanks
__________________ You design in photoshop, I code into valid XHTML/CSS. Professional PSD, PNG or HTML to tableless XHTML/CSS designs. For more info, send me a PM. |
| |
| | #4 (permalink) |
| NamePros Regular | There's also number_format if you want something built in PHP Code: |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |