Variable creation from a function argument
I have come across some code in someone's API that I wish to use myself and I wonder if anyone could advise me on how to use properly..
I am able to call function
without any return value.
Subsequently, in my php I can retrieve with -
print $array["variablename"]; //this has a value inside of it
It seems like calling that function creates an $array with local scope, yet the initial call to playerProfile() did not have a return value..
Does anyone know what I must put in the function definition to mimic this behaviour? Do I need a particular construct/keyword..
Thanks in advance and Season's greetings
Hi, I am not sure if this is what you are looking for, but you can pass a variable by reference, using '&' sign, for example:
// $a is 6 here
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)