Re: MySQL and PHP math problem...
| From: | @ Edwin | Date: | Sat, 09 Nov 2002 13:51:52 +0000 |
| Subject: | Re: MySQL and PHP math problem... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123572@lists.php.net to get a copy of this message | ||
Hello,
"Peter" <rpete@hotmail.com> wrote in message
news:20021109065959.35268.qmail@pb1.pair.com...
...[snip]...
> the result of echo, $tmp is displayed as '0.0002'. What's wrong here?
The
> problem only occurs when the value is greater than a 1,000? Could the ','
> messed the computation up somehow?
I think so because
1/5000 = 0.0002
(Only the number *before* the ',' is being used.)
Try taking away the ',' then by using str_replace() and calculate again.
- E