Bug #9834 Updated: Unable to handle double variables
| From: | sniper@php.net | Date: | Thu, 19 Apr 2001 13:33:39 +0000 |
| Subject: | Bug #9834 Updated: Unable to handle double variables | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-51963@lists.php.net to get a copy of this message | ||
ID: 9834
Updated by: sniper
Reported By: jan.wurl@prosales-europe.com
Old-Status: Feedback
Status: Closed
Bug Type: Math related
PHP Version: 4.0.4pl1
Assigned To:
Comments:
No feedback.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-03-19 11:49:07] sniper@php.net
Works for me just fine. But I think it's some locale
thingie. You might have ',' as the decimal separator.
Try setting the locale correctly:
setlocale(LC_NUMERIC, "en_US");
or something like that. Or you ',' as the separator.
--Jani
---------------------------------------------------------------------------
[2001-03-19 06:11:28] jan.wurl@prosales-europe.com
I try to set a variable with a double value:
$a=2.54;
$b="2.54"
but PHP ignores everything after the point
echo ($a*100) results 200
echo ($b*100) results 200
I tried everything, i thought it might be work (like setting datatype before set the value, ...),
but nothing worked.
Jan Wurl
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9834&edit=2