jason310771 Posted March 27, 2011 Share Posted March 27, 2011 Please can someone advise how I remove the | characters from a string? I tried the following but get errors that... Warning: preg_replace() [function.preg-replace]: No ending delimiter '|' $value = preg_replace("|", "", $value); Link to comment https://forums.phpfreaks.com/topic/231848-how-to-remove-all-from-a-string/ Share on other sites More sharing options...
silkfire Posted March 27, 2011 Share Posted March 27, 2011 You don't need regex here just use normal replace: $value = str_replace('|', '', $value); Link to comment https://forums.phpfreaks.com/topic/231848-how-to-remove-all-from-a-string/#findComment-1192826 Share on other sites More sharing options...
jason310771 Posted March 27, 2011 Author Share Posted March 27, 2011 thank you Link to comment https://forums.phpfreaks.com/topic/231848-how-to-remove-all-from-a-string/#findComment-1192846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.