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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.