Issue
How to replace @ and . symbols from an email address with - symbol using preg_replace() function in php ?
Solution
Since your search patterns are just strings, using string replacement using str_replace is better as suggested in other answer.
Here goes the preg_replace based answer:
$str = preg_replace('/@|\./','-',$str);
Answered By - codaddict Answer Checked By - Willingham (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.