note 115988 added to function.strtr

From: Date: Thu, 23 Oct 2014 09:44:27 +0000
Subject: note 115988 added to function.strtr
Groups: php.notes 
Request: Send a blank email to php-notes+get-200719@lists.php.net to get a copy of this message
<?php /** * Clean string, * minimize and remove space, accent and other * * @param string $string * @return string */ public function mb_strtoclean($string){ // Valeur a nettoyer (conversion) $unwanted_array = array( 'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', ' ' => '', '_' => '', '-' => '', '.'=> '', ',' => '', ';' => ''); return mb_strtolower(strtr($string, $unwanted_array )); } ---- Server IP: 195.221.21.36 Probable Submitter: 94.103.141.65 ---- Manual Page -- http://php.net/manual/en/function.strtr.php Edit -- https://master.php.net/note/edit/115988 Del: integrated -- https://master.php.net/note/delete/115988/integrated Del: useless -- https://master.php.net/note/delete/115988/useless Del: bad code -- https://master.php.net/note/delete/115988/bad+code Del: spam -- https://master.php.net/note/delete/115988/spam Del: non-english -- https://master.php.net/note/delete/115988/non-english Del: in docs -- https://master.php.net/note/delete/115988/in+docs Del: other reasons-- https://master.php.net/note/delete/115988 Reject -- https://master.php.net/note/reject/115988 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200719) next »