i'm sure i'm just missing something very obvious, but i can't figure it out. i'm using includes to build pages (something i've done countless times before). i believe i'm following the correct format, but variables i'm defining do not seem to have a value "downstream" in the include files.
example code:
<?
//set some variable
$pagecolor="#ffffff";
$title="welcome to this website";
include("/includes/top.php");
print "the page color is $pagecolor";
?>
top.php has:
<?
print "the page color is $pagecolor"
?>
the results are:
the page color is
the page color is #ffffff
any thoughts on why the var isn't being recognized by the code in the include file? as long as i'm defining it ahead of the include, shouldn't all subsequent, downstream code have that var. available?
Thanks!