I
I
Irainfr20212020-11-29 13:28:28
PHP
Irainfr2021, 2020-11-29 13:28:28

Can the Russian name saved in cookies be cut to the first letter?

Hello everyone, please help. There is a Name written in cookies, on the php page I display it with this value <?php echo mb_substr ($_COOKIE['name567'],0,1); ?> (Only the first letter of the name is needed)
The whole site is encoded in utf8

On the local server, cuts to 1 letter and displays Cyrillic. I upload to the server
in place of the letter a question mark in a triangle. how can I solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2020-11-29
@Irainfr2021

mb_internal_encoding("UTF-8");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question