Menu
I’m sure this is dead easy, but how can I call a script-wide var from within a function? Is it something you do when defining the var, or is it a method of calling from within the function?
i.e.
$var = “poo”;
function test() {
echo $var; //outputs ‘poo’
}
Thanks in advance.