php add thousandseperator without adjusting decimal places
        Posted  
        
            by bobwah
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by bobwah
        
        
        
        Published on 2010-05-24T13:31:28Z
        Indexed on 
            2010/05/24
            16:01 UTC
        
        
        Read the original article
        Hit count: 270
        
php
|numberformat
I'm looking for a way to use the php number_format function or something similar that will add the thousand seperator but will leave any decimal part of the number intatct without and formatting of this. For example:
39845.25843 => 39,845.25843
347346.8 => 347,346.8
1000000 = > 1,000,000
Thanks
© Stack Overflow or respective owner