helloise Posted March 30, 2011 Share Posted March 30, 2011 i have: $msg = ereg_replace("[^A-z0-9]"," ",$msg); $msg = ereg_replace(" "," ",$msg); $msg = ereg_replace(" "," ",$msg); how will i apply preg_replace please??? thank you Link to comment https://forums.phpfreaks.com/topic/232148-help-on-preg_replace-please/ Share on other sites More sharing options...
gizmola Posted March 30, 2011 Share Posted March 30, 2011 Where you have ereg_replace, you change that to preg_replace(). Also your regex's need to have a delimitter around the regex. Usually people use the forward slash. '/[^A-z0-9]/i' This is all stuff that you can read about in the manual. If you have a more specific question people might be able to help. Link to comment https://forums.phpfreaks.com/topic/232148-help-on-preg_replace-please/#findComment-1194192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.