Re: [PHP-WIN] Passing by reference...

2001-12-31 Thread Anthony Ritter
Michael Sims wrote in message: > Yes, that is true. The "tax" function has the ampersand in the argument > list, which means that any variable that you send to it gets passed by > reference. This means that any changes to that variable that occur inside > the function will actually affect the sa

Re: [PHP-WIN] Passing by reference...

2001-12-31 Thread Michael Sims
At 08:51 PM 12/31/2001 -0600, Anthony Ritter wrote: >... >function tax (&$Salary) > { > $Salary= $Salary - (($Salary/100)*20); > return $Salary; > } >$Salary=2500; >echo (tax($Salary)); // This displays $2000 >echo $Salary; // This also di

Re: [PHP-WIN] Passing by reference...

2001-12-31 Thread Anthony Ritter
Michael, The following is the code taken line for line from Wrox - Beginning PHP - on page 204. ... The question really was about the *ampersand* in the argument line which supposedly changes the value of the va

Re: [PHP-WIN] Passing by reference...

2001-12-31 Thread Michael Sims
At 07:37 PM 12/31/2001 -0600, Anthony Ritter wrote: >.. >function tax (&$Salary) > { > $Salary= $Salary - (($Salary/100)*20); > return $Salary; > } >$Salary=2500; >echo $Salary; >?> >.. > >The result in the textbook is 2000