stripos returns false when special characters is used

后端 未结 4 1618
名媛妹妹
名媛妹妹 2020-12-07 02:14

I am using the stripos function to check if a string is located inside another string, ignoring any cases.

Here is the problem:

stripos(\"ø\", \"Ø\")         


        
4条回答
  •  暖寄归人
    2020-12-07 02:32

    As the other solutions say, try first with mb_stripos(). But if using this function doesn't help, check the encoding of your php file. Convert it to UTF-8 and save it. That did the trick for me after hours of research.

提交回复
热议问题