Accessing variables in another file with PHP -
How can I get variable values from another file in php? To get the value of $ name stored in file 1, I need a file and store it as a variable
file1.php:
$ name = "myname"; $ Name echo; file2.php:
$ name = ""
Add it at the top of the file 2.php:
Include ('file1.php');
Comments
Post a Comment