$val1 = false;
$val2 = 10;
$variable = $val1 || $val2;
the above code does $variable = true.
Is there any statement in PHP that will make a $variablevalue $val2if $val1false? I thought I would ||do this, but only returns true if either of the values ββis true or false if both are false ...
source
share