Eval($var);

That should execute the code....  I've never tried this to be honest,
you will have to let me know your findings.   I was thinking of doing
something like it in perl, so that you could have a small daemon
running, and it connects to a master server and updates its own code
somehow...

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-----Original Message-----
From: Joseph Koenig [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 23:23
To: [EMAIL PROTECTED]
Subject: [PHP] Store PHP Code in MySQL?


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


Reply via email to