foochuck Posted April 22, 2010 Share Posted April 22, 2010 This should be easy but I can't figure it out. I have a string: $myString = "cr-charles-rob"; I want to remove the dashes ( - ) from the string so it looks like this: "crcharlesrob" What function can I use to accomplish that? Link to comment https://forums.phpfreaks.com/topic/199413-removing-a-dash-from-a-string/ Share on other sites More sharing options...
MatthewJ Posted April 22, 2010 Share Posted April 22, 2010 $myString = "cr-charles-rob"; $myString = str_replace("-", "", $myString) Link to comment https://forums.phpfreaks.com/topic/199413-removing-a-dash-from-a-string/#findComment-1046585 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.