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 Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.