There is a word Pini and It is necessary that the date is
$ a = "dates";
FUNCTION ($ A, 1)
Answer 1, Authority 100%
If you have an extension of the MB_STRING extension, you can do this as follows
& lt;? php
$ a = "dates";
Echo MB_Substr ($ A, 0, -1);
mb_substr ()
Returns a substring of the first argument, a position is transmitted as the second argument, where the substring begins (in our case, the beginning), and as a second – the length of the substring (the current length of the string is minus one character) .