note 14221 added to function.eval.php

From: Date: Mon, 23 Jul 2001 09:36:33 +0000
Subject: note 14221 added to function.eval.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-15691@lists.php.net to get a copy of this message
eval can be used as a function. $a=2; $b=20; $teststr="if ($a>10) return true;"; $teststr2="if ($b>10) return true;"; if ((eval($teststr)) && (eval($teststr2))){ echo "true"; } else { echo "false"; } i get to use this when my $teststr and $teststr2 test condition depends on other variables. http://www.php.net/manual/en/function.eval.php

« previous php.notes (#15691) next »