note 64831 deleted from function.eval by bjori

From: Date: Fri, 21 Apr 2006 13:18:44 +0000
Subject: note 64831 deleted from function.eval by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108923@lists.php.net to get a copy of this message
Note Submitter: nvdberge at yahoo dot com Reason: useless ---- This is a simple example of a string converted to a boolean using eval(). This can be useful when you get a value from the database (as a string). <?php $string = "true"; $bool = eval("return ".$string.";"); if ($bool === true) echo "boolean is true"; else echo "boolean is not true"; ?>

« previous php.notes (#108923) next »