On Mon, 2003-06-16 at 16:45, Suhas Pharkute wrote: > Hello, > > I have a php script which generates a string which has php code in it. I need to > run that code. > > For example: > > <?php > > $str = " <?php echo 'Hello World!'; ?>"; > ?> > > > Is there any way that we can do it? I know I can do it by writing it to file but > then it is no more secured. > > Please let me know, > > Thanks > Suhas
You want eval(). It should all be explained here: http://www.php.net/eval Hope this helps, Torben -- Torben Wilson <[EMAIL PROTECTED]> +1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====----- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php