Use $variable from file1.php in file2.php (different file paths)
Store the value is a function or make it global; function get_variable_1(){ return 5; } OR global $variable_1; $variable_1 = 5; But.. really, what you need to do it to read a bit more about the basic of PHP to understand how variables and functions work – global variables are not really a good idea … Read more