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:[EMAIL PROTECTED]
"Joseph Koenig" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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
>