Re: string prints out as number (E+10...), why?
| From: | - Edwin | Date: | Thu, 09 Jan 2003 09:12:27 +0000 |
| Subject: | Re: string prints out as number (E+10...), why? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130891@lists.php.net to get a copy of this message | ||
Hello,
Jean-Christian Imbeault <jc@mega-bucks.co.jp> wrote:
> I'm passing a var into a function which is a 16 digit number, but when I
> try to print it out I get 1.11111111111E+15 instead of the expected
> 11111111111111.
>
> Why?
I guess it's because the number is converted automatically to an exponential notation if it
goes over a certain number of digits--makes it easier to read...
> How can I change this behaviour?
Perhaps, you can use sprintf()
http://www.php.net/manual/en/function.sprintf.php
HTH,
- E
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/