// Fonction rempl_accent() // Renvoie la variable en remplacant les caracteres accentues par des caracteres non accentues & // function rempl_accent($chaine) { return str_replace(explode(' ', '˝ ∑ í ì î ¡ À » Õ Œ œ à ” ‘ “ ⁄ € Ÿ û ñ ò ô ö ∏ õ ù ø ° ¨ à ü ´ ª ä † ¿ √ ’ ë ¶ ã ≥ ≤ å π ˜ ç é § – '), explode(' ', 'a a a a a c e e e e i i i i n o o o o o u u u u y y A A A A A C E E E E I I I I N O O O O O U U U U Y'),$chaine); } function nettoyerChaine($chaine){ $caracteres = array( 'À' => 'a', 'Á' => 'a', 'Â' => 'a', 'Ä' => 'a', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ä' => 'a', '@' => 'a', 'È' => 'e', 'É' => 'e', 'Ê' => 'e', 'Ë' => 'e', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', '€' => 'e', 'Ì' => 'i', 'Í' => 'i', 'Î' => 'i', 'Ï' => 'i', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'Ò' => 'o', 'Ó' => 'o', 'Ô' => 'o', 'Ö' => 'o', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'ö' => 'o', 'Ù' => 'u', 'Ú' => 'u', 'Û' => 'u', 'Ü' => 'u', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'u', 'µ' => 'u', 'Œ' => 'oe', 'œ' => 'oe', '$' => 's'); $chaine = strtr($chaine, $caracteres); $chaine = preg_replace('#[^A-Za-z0-9]+#', '-', $chaine); $chaine = trim($chaine, '-'); $chaine = strtolower($chaine); return $chaine; }