Jump to content

(Probably a very simple) Markup Query!


bruce1980

Recommended Posts

Hi

 

New to the forum (introduction in the intro section) so please be gentle!   ;D

 

 

I've started using PHP includes in my site but need to pull some data from my database to create the code for the include...

 

Heres the include...

 

<?php include '../includes/Folder/FileName.php'; ?>

 

But instead of hard coding "FileName", I want to pull the filename from my database.

 

Ive been using....

 

?php foreach($data as $row){
echo $row['ref_filename'];
}
?>

 

...to pull the filename into other places in the page but cant figure out how to get the PHP Filename code into the PHP Include code without breaking it!

 

've tried things like...

 

<?php "include '../includes/Folder/'"

foreach($data as $row){
echo $row['ref_filename']".php";
}
?>

 

But, being a complete PHP novice, I cant get it working!

 

Anyone spot the obvious mistake?

 

Cheers,

Bruce!

Link to comment
https://forums.phpfreaks.com/topic/275667-probably-a-very-simple-markup-query/
Share on other sites

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.