[ACCEPTED]-String compare not working-wordpress

Accepted answer
Score: 28

I guess one of the strings may contain trailing 2 whitespace or newline characters, so try 1 this:

if (trim($value) == trim($titelzor)) ...
Score: 0

Sometimes you should use multibyte comparison. You 4 can use the Collator object or use iconv 3 or mb_convert_encoding functions to convert 2 the string and after that, you can make 1 equal operation on it.

Score: 0

Try using strcmp:


It's probably an encoding 1 issue.

More Related questions