Is this possible at all? The idea is to have the following:
if ($some_statement) { ... }
where $some_statement variable is a string, which looks like this:
$some_statement = ' $day == "Monday" && $weather == "sunny" ';
I have experimented a little with curly brackets and eval function, but could not get any to work. Thanks guys, you rock!
You can use
evalfor this, but keep in mind that the statement in the string must be a complete PHP statement.