Re: simple math computation..
| From: | Matthew Fonda | Date: | Mon, 04 Oct 2004 07:02:32 +0000 |
| Subject: | Re: simple math computation.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198575@lists.php.net to get a copy of this message | ||
Howdy.
It seems to work fine for me, perhaps you have a typo along the lines
some where.
<?php
$totalCost = 4000;
$shippingestimate = $totalCost * .20;
echo $shippingestimate;
?>
echoes 800
--
Regards,
Matthew Fonda
On Sun, 2004-10-03 at 23:26, Louie Miranda wrote:
> the percent of 20% is = .20 right?
> how can i compute the correct value for this?
>
> my $totalCost is $4,000 and when i compute it to .20 using this method..
>
> $shippingestimate = $totalCost * .20;
>
> i get the value for the shippingestimate = $0.8 which is wrong.. it should $800
> what seems to be wrong?
>
> --
> Louie Miranda
> http://www.axishift.com