Hi There,
This is meant to be as generic as possible for the sake of clarity - I thank in advance the bright guy who knows the answer to this one
I understand passing by reference, here is an example we can all understand:
function t($a){
$a=7;
}
$a=5;
echo 'a is '.$a; //starting value
t(&$a); //using the & we pass by reference
echo 'a is now '.$a;
HOWEVER, I have a function which allows an UNDETERMINED NUMBER of vars to be passed to it. How do I get the same pass-by-reference results in this case?
(following does NOT work)
function t(){
$args=&func_get_args();
$args[0]=7;
}
$a=5;
echo 'a is '.$a; //starting value
t(&$a); //using the & we pass by reference
echo 'a is now '.$a; //again, this does NOT work
Thank you for your assistance - can this be done?
Samuel