Okay, so I have a few possible matches that I need to test. It can either equal A or B, so the obvious way to test it would be something like this:
if($val=="A"||$val="B"){
echo "yup";
}
I was just wondering if their were an easier way to test values without restating the variable for every value, like this (I know this doesn’t work):
if($val==("A"||"B")){
echo "yuppers";
}
Is something like this possible?
You can use
in_array