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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.