MasterDucky
January 17th, 2011, 03:02 PM
I tried to read about global variables on tutorials but they only talking about globals in user created functions.
So what i'd like to know is if i declare a variable in the main index file will it be global for the files that i include after?
And is it the same for arrays?
...
<?php
$realpath = "G:\\hello.txt";
$titles = array();
include("file1.php");
include("file2.php");
?>
...
So what i'd like to know is if i declare a variable in the main index file will it be global for the files that i include after?
And is it the same for arrays?
...
<?php
$realpath = "G:\\hello.txt";
$titles = array();
include("file1.php");
include("file2.php");
?>
...