I know this is simple PHP logic but it just won\'t work...
$str = \"dan\";
if(($str != \"joe\")
|| ($str != \"danielle\")
|| ($str != \"heather\")
Welcome to boolean logic:
$str = 'dan'
$str != "joe" -> TRUE, dan is not joe
$str != "danielle" -> TRUE, danielle is not dan
$str != "heather") -> TRUE, heather is not dan
$str != "laurie" -> TRUE, laurie is not dan
$str != "dan" -> FALSE, dan is dan
Boolean logic truth tables look like this:
and:
TRUE && TRUE -> TRUE
TRUE && FALSE -> FALSE
FALSE && FALSE -> FALSE
FALSE && TRUE -> FALSE
or:
TRUE || TRUE -> TRUE
TRUE || FALSE -> TRUE
FALSE || TRUE -> TRUE
FALSE || FALSE -> FALSE
Your statement boiled down to:
TRUE || TRUE || TRUE || TRUE || FALSE -> TRUE