I am trying to accomplish something, as described below but am failing miserably. Any help to get something like this or very similar to work would be greatly appreciated.
I have tried both ways to call globals( global $var, and $GLOBALS[var]) neither work.
example
$foo = "This is a $bar sentance.";
function fooBar(){
global $foo;
$bar = "great";
print $foo;
}
Output:
This is a sentance.