I was hoping the below would print
live
got here
Instead it prints
got here
The code:
$config['env'] = 'live';
sayEnvironment();
function sayEnvironment () {
echo $config['env'];
echo 'got here';
}
How do I set this global variable and have everything inside a function access it?