I have a requirement where I have some conditions saved in DB. I am able to bring those conditions via my PHP code, But I am not able to execute them. I have shown one example below.
<?
$z = ">100";//I get this value from the DB
$x = 80; // This value also comes from DB
if(exec("&1 &2",$x,$z))
echo "Yes";
else
echo "No";
?>
Also tried This
<?
$z = ">100";
$x = 80;
if(eval("$x $z"))
echo "Yes";
else
echo "No";
?>
exec()is meant for shell commands.eval()runs dynamic code.