I'm building a condition check where I'm passing in the variable and a value to check. In this case the variable is an array value, but I can't get it to return it correctly
//happens somewhere else
$specialFeature['option1']="on";
$specialFeature['option2']="on";
$specialFeature['option3']="off";
//what I'm trying to do
#query a db
$row = $result->fetch_array()
#results for purpose of demo
#$row['var'] = "specialFeature['option2']";
#$row['val'] = "on";
if($$row['var'] == $row['val']){
//what i'm expecting
echo "OK";
}
My issue is $$var
is always null. What am I doing wrong? Is this possible?