note 77597 deleted from function.str-replace by felipe

From: 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

« previous php.notes (#134868) next »