Re: note 9028 added to Type Juggling
| From: | Lars Torben Wilson | Date: | Thu, 12 Oct 2000 07:45:50 +0000 |
| Subject: | Re: note 9028 added to Type Juggling | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-6402@lists.php.net to get a copy of this message | ||
noIdea@mailbox.sk writes:
> I have a little problem.
> Example:
> $a = "12.34";
> $b = (double) $a;
> $c = dobleval($a);
>
> echo $b; Result: "12"
> echo $c; Result: "12"
>
> Why ? How can I convert string to double ?
>
> http://www.php.net/manual/language.types.type-juggling.php
This note has been deleted; if you need help, please look to the
mailing lists or bug database: check out
http://www.php.net/support.php for all your questioning
needs. :) The
manual notes system is for submissions of text to be included into the
manual itself. Please make sure to read the instructions at
http://www.php.net/manual/add-note.php before
adding another note.
As to your problem, I can't reproduce it. Perhaps you have 'precision'
set to 2 in php.ini? Try changing it to something like 14 and
restarting httpd.
What version of PHP are you using? Can you send an actual snippet of
code (cut-n-paste) which does this to you?
--
+----------------------------------------------------------------+
|Torben Wilson <torben@php.net> Netmill iTech|
|http://www.coastnet.com/~torben http://www.netmill.fi|
|Ph: 1 250 383-9735 torben@netmill.fi|
+----------------------------------------------------------------+