Hello,
I have some code that looks something like this:
$CONFIG[style] = "/inc/style.css";
function genHTMLHeader($title) {
...
...
}
Inside the genHTMLHeader function, I want to call $CONFIG[style] variable. I understand this can be acheived by using "global $CONFIG" then just calling it normally. But I have been trying to use the $GLOBALS superarray instead.
But if I try to do $GLOBALS[CONFIG[style]] it doesn't work because $GLOBALS is expecting a ] and getting another [ instead. I know it's just my syntax is wrong. Is there a way to use an array value ($CONFIG[style]) inside another array ($GLOBALS)?
Thanks in advance for the help.