i want to do something like this:
$string="($a==1) OR ($b==2)";
if ($string) { do something ; }
any ideas? i tried using if (eval($string)) but that just gave me errors.
thanks
Try this:
$string = '($a == 1) OR ($b ==2)';
if (eval("return($string);")) { // do something }