PHP includes

Hey I’m new and just like homer thinks thee internets is great!!

anywho i have this include file that isn’t getting its variables from the main page, everything is working okay, the include file is being posted, it’s just this variable isn’t getting its value from the main index page, the page goes like this

$the_header .= “\t”.$title.“\n”;

this is a general html title section, and i want this variable to be recieve its value from index.html, the page to be included, why is it not?

<?php $title = "Ken Wood"; $image = "sample1.gif"; //Includes html header and footer file include("includes/headers_footers.php"); //print header print (html_header());

can you give a little more code?

are you calling the include AFTER the title?

Take out the “.” From

$the_header .= “\t”.$title.“\n”;

Hey, thanks for the reply, heres the header function, maybe its not reading the variable from the index page to the include page, because of the internal function

function html_header()
{
$the_header = “<?xml version='1.0' encoding='iso-8859-1'?>\n”;
//$the_header .= $title1 = $title;
$the_header .= “

why dont you put the print line into the include page? then you dont have to worry about transferring variables between files.