Re: Store PHP Code in MySQL?
| From: | J Smith | Date: | Tue, 19 Jun 2001 22:35:47 +0000 |
| Subject: | Re: Store PHP Code in MySQL? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54430@lists.php.net to get a copy of this message | ||
Try looking at the eval() function. It's pretty similar to the eval keyword
in perl.
http://www.php.net/manual/en/function.eval.php
J Smith
code, dba and linux guy
Tutorbuddy Inc.
The Magic Lantern Group
mailto:jsmith@tutorbuddy.com
"Joseph Koenig" <joe@jwebmedia.com> wrote in message
news:3B2FC2B7.EF70EC2@jwebmedia.com...
> I've been playing a little bit trying to store some PHP code in MySQL
> and get it to execute. However, it behaves just like expected in that it
> just displays the code, and doesn't execute it. Essentially, i want to
> do this:
>
> <?
> while($data = mysql_fetch_array($result)) {
> echo $data["text"];
> }
> ?>
>
> With $data["text"] containing:
> <?
> echo $var;
> ?>
>
> Anybody know a way to actually make this work? Thanks,
>
> Joe
>