I have an expression which looks like this:
$condition = "$foo>$bar";
and an array which has the values for the expression elements:
array(
'foo' => 3,
'bar' => 4
)
I did the replacement, in the $condition
string using the str_replace()
function, but the 3>4
expression returns true.
How can I properly evaluate my $condition
expression in a if()
statement?