Jump to content

Is it possible: Outputting dynamic PHP code into the source file from a DB


PoringIsland

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.