simon551 Posted July 7, 2007 Share Posted July 7, 2007 Hi, If a user enters a number with a comma in it say 11,000.70 how do I strip out the comma to insert it correctly? Thanks in advance! -s Link to comment https://forums.phpfreaks.com/topic/58880-solved-format-a-number-for-inserting-into-db/ Share on other sites More sharing options...
cooldude832 Posted July 7, 2007 Share Posted July 7, 2007 $string = "11,700"; $string = strreplace(",","",$string); Link to comment https://forums.phpfreaks.com/topic/58880-solved-format-a-number-for-inserting-into-db/#findComment-292146 Share on other sites More sharing options...
simon551 Posted July 7, 2007 Author Share Posted July 7, 2007 thanks! Link to comment https://forums.phpfreaks.com/topic/58880-solved-format-a-number-for-inserting-into-db/#findComment-292183 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.