ID: 9834 Comment by: robin dot avery at nospamforme dot com Reported By: jan dot wurl at prosales-europe dot com Status: Closed Bug Type: Math related Operating System: Windows 2000 PHP Version: 4.0.4pl1 New Comment:
try this: $a=2\.54; $b="2\.54" the forward slashes show that "." is not special. Previous Comments: ------------------------------------------------------------------------ [2001-04-19 09:33:39] [EMAIL PROTECTED] No feedback. --Jani ------------------------------------------------------------------------ [2001-03-19 11:49:07] [EMAIL PROTECTED] 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 dot wurl at prosales-europe dot 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=9834&edit=1