note 42934 added to function.str-replace

From: Date: Fri, 04 Jun 2004 07:48:10 +0000
Subject: note 42934 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-70736@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"; /* * Declare the start array * chr(64) = "@" * chr(46) = "." */ $start = array(chr(64), chr(46)); /* * Declare the end array */ $end = array(" at ", " dot "); /* * Perform the replace */ $result = str_replace($start, $end, $email); /* * outputs: john at doe dot org */ ?> ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42934 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42934&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42934&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#70736) next »