note 43052 added to function.str-replace

From: Date: Tue, 08 Jun 2004 09:20:08 +0000
Subject: note 43052 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-70566@lists.php.net to get a copy of this message
Here is the easy translitilizator: function cirylicMustDie($input) { $search = array ('à', 'á', 'â', 'ã', 'ä', 'å', '¸', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', '¨', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß'); $replace = array ('a', 'b', 'v', 'g', 'd', 'e', 'yo', 'zh', 'z', 'i', 'ii', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'ch', 'ts', 'ch', 'sh', "sh'", "", 'y', "'", 'e', 'yu', 'ya', 'A', 'B', 'V', 'G', 'D', 'E', 'Yo', 'Zh', 'Z', 'I', 'II', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'T', 'U', 'F', 'Ch', 'Ts', 'Ch', 'Sh', "Sh'", "", 'Y', "'", 'E', 'Yu', 'Ya'); return str_replace($search, $replace, $input); }; //func ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43052 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43052&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43052&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#70566) next »