note 77597 deleted from function.str-replace by felipe
| From: | felipe@php.net | Date: | Sun, 06 Jan 2008 12:46:07 +0000 |
| Subject: | note 77597 deleted from function.str-replace by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134868@lists.php.net to get a copy of this message | ||
Note Submitter: molokoloco at gmail dot com
----
function clean($string) {
$bad = array('\â', '’', 'â¦',
'…');
$good = array('\'', '\'', '...', '...');
$string = str_replace($bad, $good, $string);
}
// The result seem to have a bug...
print_r(clean('totot@toto.com'));
//=> totot@totoâ¦com