I have a separate file where I include variables with thier set value. How can I make these variables global?
Ex. I have the value $myval in the v
$myval
v
Using the global keyword in the beginning of your function will bring those variables into scope. So for example
$outside_variable = "foo"; function my_function() { global $outside_variable; echo $outside_variable; }