Home php Help with '& amp; # 65279; '

Help with ‘& amp; # 65279; ‘




It comes to me from the PHP handler of the famous SMS service. But the whole problem is that when I try to pull out the information, it is “attached” to the beginning, “here is such a symbol:” & amp; # 65279 “At the end more”; “(if I write everything together, it will be empty in this message) . It is also displayed as a space.

How to get rid of it (PHP)?

Answer 1, Authority 100%

This character is Byte sequence marker . It must be removed from the start of the PHP processor file. If the handler on the service side is to inform technical support

Answer 2, Authority 100%

Maybe there is a really different solution solution, but that’s what I came up with:

$ text = trim (substr ($ text, 3));


$ Text = Trim (Substr ("CP1251", "UTF-8", $ Text), 6)) ;


$ str = trim (preg_replace ('/ \ x {feff} / u', '', $ str)));

The whole problem is that the answer comes from them in CP1251, and everything works for UTF-8 without a break.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions