Skip to content
Advertisement

Why does php strpos() sometimes does not work on Unicode character?

I’m building a system that categorizes woo-commerce products by their name, my product’s name is in Hebrew. I have to check in my code if a name of a product contains a Hebrew word.

if I write something like:

JavaScript

it will work properly but when I try to do it with a return from a function like here

JavaScript

it does not work it just returns null. assigning the output of the function to a variable does not seem to work.

I tried it with and without hebrev() and it still does not work.

Am I doing anything wrong? is there any way to fix the problem?

Advertisement

Answer

Use:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement