Transfer variables from one function to another
I think this question is kinda dumb and maybe its already asked somewhere.
I came across this problem many times before and because of my lack of knowledge i couldnt go over it.So I'm asking now how is it possible. PHP Code:
If i define it out of the both functions, again it will ot have the same value. |
Re: Transfer variables from one function to another
First of all...
PHP Code:
PHP Code:
The whole code should be something like this: PHP Code:
|
Re: Transfer variables from one function to another
I'm not 100% sure what your question is but maybe this will help.
Passing a variable by-reference. You will see "Var1=4" in console. PHP Code:
PHP Code:
|
Re: Transfer variables from one function to another
The thing that I'm asking is how to pass values from a function to another.Like in my example i want to pass the value of variable 'a' in asd() to the variable 'a' in adf().I just want 'a' in asd() to be equal to 'a' in adf().
|
Re: Transfer variables from one function to another
PHP Code:
|
Re: Transfer variables from one function to another
Thank you @Owyn.Now when that is cleared I'm asking again how to do it but this time for multiple values passed in a single function.
|
Re: Transfer variables from one function to another
PHP Code:
|
Re: Transfer variables from one function to another
omfg thank you again.That clears up eveything.
|
| All times are GMT -4. The time now is 07:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.