Re: Arrays past to functions
| From: | Niel Archer | Date: | Fri, 27 Jul 2007 18:40:02 +0000 |
| Subject: | Re: Arrays past to functions | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-28270@lists.php.net to get a copy of this message | ||
Hi Jacob.
Spotted another problem.
function compute_salestax ($Amount , $State)
{
$taxRate = array("CA" => 5 , "WA" => 7, "OR" => 8);
return $Amount / 100 * $taxRate($State);
}
$payment = 1500;
$locale = 'CA';
print "Tax on $amount in $locale is " . compute_salestax ($payment , $locale);
--
Niel Archer