0
Access to a specific variable in 2seprate files
a variable(such as X) define in line 3 in index.php file.in line 5, i include another php file.Can i access the variable(X) into included file?
2 Réponses
+ 5
You can if you put the include "another.php" line after the line where the X variable is declared (in index.php), I assume index.php here includes another.php and not the other way around.
Hth, cmiiw
+ 1
Why do you upvote your own question haha
But no you would have to include the index.php in this other file so it doesn't work