Answer the question
In order to leave comments, you need to log in
Does Paypal require an invoice when transferring from an individual to an individual?
Paypal requires an invoice when transferring from an individual to an individual, how to do it and do I have to do it?
Why do I need an invoice for 2 individuals
Answer the question
In order to leave comments, you need to log in
According to translit-online , I believe that transliteration by the State Department is a priority.
I think the bike is everything.. But I did)
$str = 'ТемнеЕ Еешка еЕЕе виньетька';
$rus_alphabet = ['/(?<=(?i)а|е|ё|и|о|у|ы|э|ю|я|ь|ъ|\b|ye)Е/u', '/(?<=(?i)а|е|ё|и|о|у|ы|э|ю|я|ь|ъ|\b|ye)е/u',
'/а/','/б/','/в/','/г/','/д/','/е/','/ё/','/ж/','/з/','/и/','/й/','/к/','/л/','/м/','/н/','/о/','/п/','/р/','/с/','/т/','/у/','/ф/','/х/','/ц/','/ч/','/ш/','/щ/','/ь/','/ы/','/ъ/','/э/','/ю/','/я/',
'/А/','/Б/','/В/','/Г/','/Д/','/Е/','/Ё/','/Ж/','/З/','/И/','/Й/','/К/','/Л/','/М/','/Н/','/О/','/П/','/Р/','/С/','/Т/','/У/','/Ф/','/Х/','/Ц/','/Ч/','/Ш/','/Щ/','/Ь/','/Ы/','/Ъ/','/Э/','/Ю/','/Я/'];
$transliterate = ['Ye', 'ye',
'a','b','v','g','d','e','yo','zh','z','i','y','k','l','m','n','o','p','r','s','t','u','f','kh','ts','ch','sh','shch','','y','','e','yu','ya',
'A','B','V','G','D','E','Yo','Zh','Z','I','Y','K','L','M','N','O','P','R','S','T','U','F','Kh','Ts','Ch','Sh','Shch','','Y','','E','Yu','Ya'];
$str = preg_replace($rus_alphabet, $transliterate, $str);
echo $str;
// TemneYe Yeyeshka yeYeYeye vinyetka
At first glance, it is better to make the replacements in two stages - with the first pass, make 'e' on 'ue', with the second pass, replace the rest of the Russian 'e'.
Do it in 2 steps:
1. Mark up tokens (combinations of letters and single letters from the initial word) and indicate the necessary action to replace each token (what to change to).
2. Replace each token (and at the very end: concatenate to get the full word).
or
Keep the correct order inside the replacement array: first - 3 letters, then - 2, then - the remaining single ones.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question