dmccabe Posted December 30, 2008 Share Posted December 30, 2008 I have a text field that contains a number eg 17,365 When I come to enter this in to the db it picks up the , (comma) as a separator. How can I get round this? I tried: $value = trim($value,","); with no luck? Link to comment https://forums.phpfreaks.com/topic/138889-how-to-remove-a-comma-from-some-numbers/ Share on other sites More sharing options...
premiso Posted December 30, 2008 Share Posted December 30, 2008 str_replace Should do the trick. Link to comment https://forums.phpfreaks.com/topic/138889-how-to-remove-a-comma-from-some-numbers/#findComment-726274 Share on other sites More sharing options...
dMilesFox Posted December 30, 2008 Share Posted December 30, 2008 Yeah, I second "premiso" option! Link to comment https://forums.phpfreaks.com/topic/138889-how-to-remove-a-comma-from-some-numbers/#findComment-726278 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.