I have a condition stored in a variable $condition = "1==1"
and I want to use the value of the variable in a conditional statement.
if($condition) { //$condition should be parsed as 1==1
return true;
}
Is this possible? I've tried using var_export
but apparently that doesn't work.
if(var_export($condition)) {
return true;
}
Any help will be greatly appreciated!