Re: Executing the value of a variable
| From: | Marek Kilimajer | Date: | Sat, 02 Nov 2002 14:29:18 +0000 |
| Subject: | Re: Executing the value of a variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122522@lists.php.net to get a copy of this message | ||
You want to look at eval();
Jackson Miller wrote:
I would like to store some code in a database and load/execute that code based on a query. Is it possible to execute the value of a variable in a php script? I am aware of several other ways to accomplish the same task, but I just want to see if there is in fact a performance hit from storing code in a database. I tried something along the line of: while ($row = mysql_fetch_array($result) { function loaded_module() {$row[moduleCode];} } loaded_module(); but that doesn't seem to work. Any thoughts? -Jackson