![]() |
Help with variable scope
How can a make a variable retain its value
$myvar = 'some text'; require_once('./global.php'); require_once('./includes/functions_newpost.php'); Need $myvar to still have its value here, but it does not. I can't put the require code first because it will mess with other variables. What I want to do is add on to a file and store some data to variables, require some other files I need, then use those variables. Thanks |
Quote:
Consider your VAR name a RESERVED word in vBulletin and change it's name. If it changes after the includes, you have chosen a variable name that exists in vbulletin therefore creating a conflict. The fix is to change your variable name. |
Thanks :)
|
All times are GMT. The time now is 02:43 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|