How to make variables visible when including some file. For example:
code.php:
<?php
global $var; $var = "green";
?>
index.php:
<?php
include("code.php");
Function index(){
echo "The apple is $var";
}
?>
Please note that in code.php there are a lot of global variables (~150 variables) and all variables are used in many different functions inside the index.php.