theguy Posted February 8, 2004 Share Posted February 8, 2004 (edited) lets say I have the following: $varA = "Hello"; $varB = "Goodbye"; One() Func One() Send ($varA); Two() Send ($varA); EndFunc Func Two() $varA = $varB; EndFunc I want this to output "Hello", then "Goodbye. But in Func Two() it dosn't seem to take the variable back to Func One. Any help would be greatly appreciated. Edited February 8, 2004 by theguy Link to comment Share on other sites More sharing options...
w_sp8er Posted February 8, 2004 Share Posted February 8, 2004 Variables used inside functions are classed by default as LOCAL variables. To use a variable between (and outside) functions you need to do this GLOBAL $variable before using the variable. Link to comment Share on other sites More sharing options...
jpm Posted February 8, 2004 Share Posted February 8, 2004 lets say I have the following: $varA = "Hello"; $varB = "Goodbye"; One() Func One() Send ($varA); Two() Send (varA); EndFunc Func Two() $varA = $varB; EndFunc I want this to output "Hello", then "Goodbye. But in Func Two() it dosn't seem to take the variable back to Func One. Any help would be greatly appreciated.It is working as you want just put a $varA in the second Send. I don't thing it was the problem you were trying to solve. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now