PHP - Call one function in another, retrieve variable -


why echoing variable test1() in test2() in following code not work? thought if execute function in 1 jsut if code placed in there. , how can make work?

function test1() {     $var = "hallo"; }  function test2() {     var();     global $var;     echo $var; }  test2() ; 

the $var variable isn't in scope of test2() function.

see: this post details.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -