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
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
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
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