I'm trying to get variables that I defined while in a function from another function I called in that function, example:
$thevar = 'undefined';
Blablahblah();
echo $thevar; (should echo blaaah)
function Blahedit(){
echo $thevar; (should echo blah)
$thevar = 'blaaah';
}
function Blablahblah(){
global $thevar;
$thevar = 'blah';
Blahedit();
}
I want to know if there's another way of doing this without passing down params to Blahedit(), get_defined_vars gives me vars within the function not $thevar... and calling global $thevar will just give me the previous unedited version.
Please help ):