I am trying to compare the following: if the value is not an array or the value does not equal false, return.
if (is_array($value) != true || $value != false) return;
This, and any other variation I am trying doesnt seem to work. However, when I compare these individually in their own if statements they return the correct results.
Any help would be greatly appreciated!
You originally said “if it’s not an array or not false”. You’re thinking backwards. You want “if the value is an array or false continue, else return”.
So:
Using De Morgan’s laws, we can convert this to