There is a word Phenic and it is necessary that Pate

$a = "Финики"; function($a,1) 
  • You just need to cut off the last letter or translate the plural in the singular? If the first - well, take the trouble to have a look at some "PHP Tutorial for the youngest" ... - PinkTux
  • I need the first thing I know how to do one word, but I need a function because there are many words and I have if ($ a [$ i] == $ search) <br> if you don’t understand there array - BedOmar
  • 2
    substr("Финики", 0, -1) - MasterAlex
  • @MasterAlex make it the answer, please, then after editing the question it will be possible to do similar questions with duplicates - strangeqargo
  • @strangeqargo MasterAlex and this is wrong for Cyrillic ... - Alexey Shimansky

1 answer 1

If the mb_string extension is available to you, you can do the following:

 <?php $a = "Финики"; echo mb_substr($a, 0, -1); 

The mb_substr() function returns the substring of the first argument, the second argument is the position from which the substring begins (in our case, the beginning), and the second is the length of the substring (the current length of the string minus one character).