<?php
$d=10;
$i=10;
$s=10;
$fc = `$d==$i && $i==$s`;
$f = '$d + 100';
$code = 'if ((' . $fc . ') == TRUE) { return "' . $f . '";}';
$ntotal = eval($code);
?>
Any alternative for this simple code NOT using eval or for newer PHP versions.
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
<?php
$d=10;
$i=10;
$s=10;
$fc = `$d==$i && $i==$s`;
$f = '$d + 100';
$code = 'if ((' . $fc . ') == TRUE) { return "' . $f . '";}';
$ntotal = eval($code);
?>
Any alternative for this simple code NOT using eval or for newer PHP versions.