note 29430 added to function.str-replace

From: Date: Thu, 13 Feb 2003 12:03:28 +0000
Subject: note 29430 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-43877@lists.php.net to get a copy of this message
how to remove accents from text 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"); -- http://www.php.net/manual/en/function.str-replace.php http://master.php.net/manage/user-notes.php?action=edit+29430 http://master.php.net/manage/user-notes.php?action=delete+29430 http://master.php.net/manage/user-notes.php?action=reject+29430

« previous php.notes (#43877) next »