[Solved] Php Variable as conditional assignment with eval() [duplicate]
[ad_1] You’re missing return and a semicolon. But really, you should avoid eval. <?php $foo = 1; $bar = 2; $test=” && $bar == 2″; if(eval(‘return $foo == 1’ . $test . ‘;’)) { echo “That horribly eval()’d code worked!”; } ?> [ad_2] solved Php Variable as conditional assignment with eval() [duplicate]