php preg_match, how to switch values

Stittycetry

New Member
Please help with this little issue if you could.I would like to search a string, if a match is made, I'd like to change the value to something else.eg. \[code\]if (preg_match("gmail",$email)) {// code needed to switch "gmail" for "googlemail"}\[/code\]This is needed because my mail server won't accept an email address in 'gmail.com' format. Thanks in advance. Shane
 
Back
Top