I am using the stripos function to check if a string is located inside another string, ignoring any cases.
Here is the problem:
returns false. While
As you might see, it looks like the function does NOT do a case-insensitive search in this case.
The function has the same problems with characters like Ã†Ã¦ and Ã…Ã¥. These are Danish characters. What is the problem and what can I do to fix it?
mb_stripos() instead. It's character set aware and will handle multi-byte character sets. stripos() is a holdover from the good old days when there was only ASCII and all chars were only 1 byte.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki