note 42934 modified in function.str-replace by aidan
| From: | aidan@php.net | Date: | Sat, 26 Jun 2004 13:58:02 +0000 |
| Subject: | note 42934 modified in function.str-replace by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71765@lists.php.net to get a copy of this message | ||
An easy way to convert email addresses to the PHP.net comment-style email addresses:
<?
$email = "john@doe.org";
$search = array('@', '.');
$replace = array(" at ", " dot ");
$result = str_replace($search, $replace, $email);
?>
Outputs:
john at doe dot org
--was--
An easy way to convert email addresses to the PHP.net comment-style email addresses:
<?
$email = "john@doe.org";
$search = array('@', '.');
$replace = array(" at ", " dot ");
$result = str_replace($start, $end, $email);
?>
Outputs:
john at doe dot org
http://php.net/manual/en/function.str-replace.php