😕 Hi,
I have a basic script that takes an array, builds a select drop-down menu. When submitted it saves Key value in db. Later when the page loads I am trying to get that value, check if it's in my array and if yes, select appropriate option line.
if (in_array($myClass->myVar, $myArray)) {
$mySelect = 'preset';
} else {
$mySelect = 'custom';
}
No matter what I do I keep getting
$mySelect == 'custom'
even if I directly copy a key value from my array and paste in this "if" statement to test.
I've tried strict as well, same results.
Lost.