note 29430 deleted from function.str-replace by felipe

From: Date: Sun, 06 Jan 2008 12:50:02 +0000
Subject: note 29430 deleted from function.str-replace by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-134886@lists.php.net to get a copy of this message
Note Submitter: mv@anywhere dot br ---- how to remove accents from text <?php function accents($text) { global $export; $search = array ('ç', 'á', 'é', 'í', 'ó', 'ú', 'ã', 'õ', 'â', 'ê', 'î', 'ô', 'û'); $replace = array ('c', 'a', 'e', 'i', 'o', 'u', 'a', 'o', 'a', 'e', 'i', 'o', 'u'); $export = str_replace($search, $replace, $text); return $export; } accents("Carnaval é só no Brasil"); ?>

« previous php.notes (#134886) next »