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 Code:
...
<?php
     $realpath 
"G:\\hello.txt";
     
$titles = array();
     include(
"file1.php");
     include(
"file2.php"); 
   
?>
...