Re: [PHP] passing references multiple levels of function calls

2001-05-22 Thread Chris Lee
your close. the '&' goes in front of the variable being given, not in the function args. -- Chris Lee [EMAIL PROTECTED] "Dennis Gearon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to be able to do this: > > function f_of_A( &$vara ){ > $

[PHP] passing references multiple levels of function calls

2001-05-22 Thread Dennis Gearon
I want to be able to do this: function f_of_A( &$vara ){ $var +=1; } function f_of_B( &$varb ){ $var %=3; } function do_both( &$vara, &$varb ){ f_of_A( $vara ); f_of_B( $varb ); } $gvara=some_number; $gvarb=some_other_number; do_both( $gvara, $gvarb ); and have the original, global v