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 ){
> $
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
2 matches
Mail list logo