In php I need to check if 5 variables are the same value, and then proceed.
Instead of doing
if($a == 'logged' && $b == 'logged' && $c == 'logged' && $d == 'logged' && $e == 'logged')
{
// Code to run here
}
Is there a different way to do it? Like:
if($a,$b,$c,$d == 'logged')
Something like that possible..?
Parse error: syntax error, unexpected '==' (T_IS_EQUAL)if (($a == $b) == ($c == "logged")) { echo "yup"; }this worked for me