Answer the question
In order to leave comments, you need to log in
How to compare two strings with different characters?
Friends.
I compare two identical-looking strings
it's a date
it's a date
which in the end turn out to be unequal.
$mysername = trim(stripslashes(strtolower($myrow2['origname'])));
$parssername = trim(stripslashes(strtolower($origname['1'])));
mb_detect_encoding($mysername) // ASCII
mb_detect_encoding($parssername) // ASCII
string(16) "it's a date"
string(20) "it's a date"
string(22) "6974277320612064617465"
string(32) "697426233033393b7320612064617465"
Answer the question
In order to leave comments, you need to log in
htmlspecialchars_decode($mysername) == htmlspecialchars_decode($parssername)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question