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 but I'm getting 2500.

That particular snippet of code *should* echo 2500...because you're not 
even calling the function.  You're setting the $Salary variable equal to 
2500 and then immediately echoing it...

Add this line before the last one:

tax($Salary);

And it should then echo 2000...

If you typed it in correctly then the book must have a misprint...


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to