Jump to content

Variables + Include


steveangelis

Recommended Posts

I am trying something that I thought would work but it fails miserably.

 

I have my index page, and it calls up another page, via the usual include("page'); function which works perfectly.  On the included page I have a series of variables that are echoed in various pages on the index page which work perfectly fine except for one.  One variable is another include like this:

 

$content = include("anotherpage.php");

 

The problem is that this second include is not being brought up where I am telling it to.  Instead it is coming up exactly where I put the first include.  Is there a way to get around this?

Link to comment
https://forums.phpfreaks.com/topic/172217-variables-include/
Share on other sites

I have my standard index page which I am using as a template page for all others.  It does the usual $_GET['p'] to get the page name from a link, and it loads the right page all fine and dandy.  On the get page, I have another include but it is with a variable like this:

 

$content = include("anotherpage.php");

 

Another page has a table along with a whole lot of strings and variables and what not on it along with a bunch of tables.

Link to comment
https://forums.phpfreaks.com/topic/172217-variables-include/#findComment-908030
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.