the_oliver Posted April 22, 2007 Share Posted April 22, 2007 Hello. Is there some way i can remove all ' from a string? Thanks! Link to comment https://forums.phpfreaks.com/topic/48188-removing-from-string/ Share on other sites More sharing options...
arianhojat Posted April 22, 2007 Share Posted April 22, 2007 a simple string translate function: $addr = strtr($addr, "'", ""); or $trans = array("'" => ""); $addr = strtr($addr, $trans ); OR a regular expression search/replace function if it gets complicated: echo preg_replace($pattern, $replacement, $string); Link to comment https://forums.phpfreaks.com/topic/48188-removing-from-string/#findComment-235569 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.