PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Yuriy Malchenko   Translit   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: an example
Class: Translit
Transliterate cyrillic text using latin characters
Author: By
Last change:
Date: 19 years ago
Size: 318 bytes
 

Contents

Class file image Download
<?
include("translit.php");
$str = "Это небольшой пример использования функции транслитерации...
Эта строка в кодировке cp-1251, а результат мы получим в utf-8."
;
echo
"Before:<pre>$str</pre><hr />";

$t = new Translit();
$trans = $t->Transliterate($str, "cp1251", "utf-8");
echo
"After:<pre>$trans</pre>";
?>