PHP Parsing and text
Posted: Mon Jul 07, 2003 7:30 pm
I'm not sure this question has been asked before, but since I wasn't even sure how to look for it, I couldn't find anything about it on the forums.
First of all, I am a 2-day PHP newbie.
Now, I am trying to retrieve some info from a database, then I want to include whatever I retrieved into a php file.
Over simplified example:
name field contains:
Here's the php file which will be retrieving the info
I need to know what to do so it will actually execute the code in the database field and not just print it.
It's kind of hard for me articulate this question, but I hope someone can give me some pointers on this.
First of all, I am a 2-day PHP newbie.
Now, I am trying to retrieve some info from a database, then I want to include whatever I retrieved into a php file.
Over simplified example:
name field contains:
Code: Select all
<?php
print "Here's the info";
?>Code: Select all
<?php
$info=mysql_query("select name from table");
$name=mysql_fetch_row($info);
//the next part is what confuses me...
//if I use echo or print all it does is output:
//<?php
// print "Here's the info";
//?>
?>It's kind of hard for me articulate this question, but I hope someone can give me some pointers on this.