note 29114 deleted from function.str-replace by didou

From: Date: Thu, 24 Jul 2003 12:29:00 +0000
Subject: note 29114 deleted from function.str-replace by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52562@lists.php.net to get a copy of this message
Note Submitter: rbourgeois@netcourrier.com ---- For those that don't know French, here is a (loose) translation: Very usefull when making pages in the utf-8 format, pages that have a different charset will not recognise this one, so use this: /** * Convertit les accents en entités HTML * @param string $strTexte : chaine à traiter * @return string chaine traitée * @author Raf */ function convertToHtml($strTexte) { $arrSearch = Array ( 'é', 'è', 'ë', 'ê', 'à', 'ä', 'â', 'ù', 'ü', 'û', 'ö', 'ô', 'ï', 'î'); $arrReplace = Array( 'é', 'è', 'ë', 'ê', 'à', 'ä', 'â', 'ù', 'ü', 'û', 'ö', 'ô', 'ï', 'î'); $strReturn = str_replace($arrSearch, $arrReplace, $strTexte); return $strReturn; }

« previous php.notes (#52562) next »