Hi,
is it possible to execute a condition that is dynamic?
For example:
$from = "John";
$field1 = "from";
$str = '$'.$field1.' == " '.$from.' " ';
if ($str) {
print "HI";
}
I would want it to execute:
if ($from == "John") {
print "HI";
}
I have tried it out but it doesn't work. The statement is always true. I have tried changing "==" to "!=".