note 73625 deleted from function.str-replace by felipe

From: Date: Sun, 06 Jan 2008 12:47:27 +0000
Subject: note 73625 deleted from function.str-replace by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134871@lists.php.net to get a copy of this message
Note Submitter: quentin (dot) t (at) gmail (dot) com ---- A little enhancement to heavyraptor's replace_accents (simply adding 'cedil' and 'ring' character variations) : <?php function replace_accents($s) { $s = htmlentities($s); $s = preg_replace ('/&([a-zA-Z])(uml|acute|grave|circ|tilde|cedil|ring);/', '$1', $s); $s = html_entity_decode($s); return $s; } ?> Cheers.

« previous php.notes (#134871) next »