I have an include file that has an array of hex codes in it. It looks something like this:
<?
$color = ("000000","FFFFFF","CC0000");
?>
Thats abbreviated but you get the point. At the bottom of the same include file, I also have a CSS style tag that declares the color of links using the variable, like this:
A {
color: #<? echo $color[2]; ?>;
}
That works fine. When I view the source of the file that uses this include, it shows the CSS style tag where it should be, and it prints the proper hex code in it place.
The problem I'm having is that if I try to use this variable in the main document that uses the include, it doesn't print anything. I would have code like this:
<body bgcolor="#<? echo $color[1]; ?>">
but it would come out like this when I view source:
<body bgcolor="#">
ANy ideas as to what I need to do to the variable in the include file to get it to pass the values from its array to the main files?