PoringIsland Posted February 25, 2008 Share Posted February 25, 2008 Hello, First off, I belive this is more of a PHP question rather than a MySQL based one, hence the forum choice. If it really belongs in the MySQL forum, if you could move it I would be very greatful. What I'm trying to find out is can you output dynamic php code into a page a similar way that include(file) works? For example. I have while($row = mysql_fetch_array($masterresult)) { $row["source"] // Value from the DB } Where in the DB the value of source is echo'Text Here'; $variable1 = 2; $variable2 = "Text"; I know if I use a echo here, it will treat it as HTML/Text and not more PHP. I can't seem to find anything online which allows me to do this, is anyone here aware of a function or a way this can be done? Thank you for any help, Andrew Link to comment https://forums.phpfreaks.com/topic/92984-is-it-possible-outputting-dynamic-php-code-into-the-source-file-from-a-db/ Share on other sites More sharing options...
PFMaBiSmAd Posted February 25, 2008 Share Posted February 25, 2008 See my answer in this recent thread - http://www.phpfreaks.com/forums/index.php/topic,184093.msg823455.html#msg823455 Link to comment https://forums.phpfreaks.com/topic/92984-is-it-possible-outputting-dynamic-php-code-into-the-source-file-from-a-db/#findComment-476398 Share on other sites More sharing options...
PoringIsland Posted February 25, 2008 Author Share Posted February 25, 2008 See my answer in this recent thread - http://www.phpfreaks.com/forums/index.php/topic,184093.msg823455.html#msg823455 Thank you very much sir. Eval() worked perfectly. Thanks again, Andrew. Link to comment https://forums.phpfreaks.com/topic/92984-is-it-possible-outputting-dynamic-php-code-into-the-source-file-from-a-db/#findComment-476400 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.