if I have a function:
function abc($var1,$var2){
$var1 = 'this is var1';
$var2 = 'this is var2';
}
how can I set variables and use the name provided in the parameter as some string defined in the function?
So if I were to run:
abc($useThis , $andThis);
How can I have it return:
// $useThis == 'this is var1'
// $andThis == 'this is var2'
I know the parameters are used as an input, but can they be used in the opposite way?
You can simply pass the parameters by reference instead of passing by value.