Jump to content

(Probably a very simple) Markup Query!


Go to solution Solved by salathe,

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!

Edited by bruce1980
Link to comment
https://forums.phpfreaks.com/topic/275667-probably-a-very-simple-markup-query/
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.