I have two strings. They are both very long, but I have used echo to display both of them prior. Not a single character is different. But when I put them in the if statement, nothing inside executes.
if ($arrayFromMySqliArrayFetch['code'] == $_POST['code']) { echo 'please work.'; }
Is something just flying over my head? I don’t understand why nothing will get executed?
I have duplicated the if statement but with different internals. How would I even narrow down what is causing the problem if there shouldn’t be one? 🙁
Edit
Thanks for everyone’s help. FYI, the strings are both trimmed and all. Using var_dump I found out that one strings has 128 characters (what it should be), and one, the $_POST has 132. Any ideas?
One of the randomly generated characters was an ampersand. It caused the difference in string length. I forgot exactly why, but that was what was causing the problem.