Return to Snippet

Revision: 21513
at December 15, 2009 05:32 by martin_rusev


Initial Code
$textcyr="Тествам с кирилица";
		$textlat="I pone dotuk raboti!";
		$cyr  = array('а','б','в','г','д','e','ж','з','и','й','к','л','м','н','о','п','р','с','т','у', 
		'ф','х','ц','ч','ш','щ','ъ','ь', 'ю','я','А','Б','В','Г','Д','Е','Ж','З','И','Й','К','Л','М','Н','О','П','Р','С','Т','У',
		'Ф','Х','Ц','Ч','Ш','Щ','Ъ','Ь', 'Ю','Я' );
		$lat = array( 'a','b','v','g','d','e','zh','z','i','y','k','l','m','n','o','p','r','s','t','u',
		'f' ,'h' ,'ts' ,'ch','sh' ,'sht' ,'a' ,'y' ,'yu' ,'ya','A','B','V','G','D','E','Zh',
		'Z','I','Y','K','L','M','N','O','P','R','S','T','U',
		'F' ,'H' ,'Ts' ,'Ch','Sh' ,'Sht' ,'A' ,'Y' ,'Yu' ,'Ya' );
		$textcyr = str_replace($cyr, $lat, $textcyr);
		$textlat = str_replace($lat, $cyr, $textlat);
		echo("$textcyr $textlat");

Initial URL


Initial Description


Initial Title
Transliteration - Cyrilic to latin and latin to cyrilic

Initial Tags


Initial Language
PHP