Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php variable problems Re: php variable problems

#66775
clokey2k
Participant

The variable is only available for the scope of the include i.e. header.php.
If you call it in the index.php first then alter the value as global $var = "Woohoo" in header.php it will be available for any include below the index.php.
See: http://php.net/manual/en/language.variables.scope.php
or: http://www.sitepoint.com/forums/showthread.php?t=344946