Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001062

Re: [PHP-DB] Storing Code in a db? From: Christopher Ostmo (tech <email protected>)
Date: 06/28/01

Mark @ 10base-t pressed the little lettered thingies in this order...

> Hey there,
> Is it possible to store code like a function, for example, in a mysql
> database and pull it into a php dynamicallly so you can use the function if
> needed?
>

Yes, it is possible, but you need to run the code through eval() for it to
do anything useful.
ie
        while ($row = mysql_fetch_row($result)) {
        echo eval($row[0]);
        }

Good luck...

Christopher Ostmo
a.k.a. tech <email protected>
AppIdeas.com
Meeting cutting edge dynamic
web site needs

For a good time,
http://www.AppIdeas.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>