Single = is an assignment operator so that would always return true, when comparing for equality you need at least a double equals ==I Im trying to make a sign in section in my website and my if statement is always counted as true. the code I have is
$testword = "test";
if($testword = "testing"){
echo "yes";
}
the website always displays yes.
thanks! I have never seen double = in php, but I guess I should have known as I have used it frequently in other languages.Single = is an assignment operator so that would always return true, when comparing for equality you need at least a double equals ==