Re: string prints out as number (E+10...), why?
| From: | Jean-Christian Imbeault | Date: | Thu, 09 Jan 2003 09:14:30 +0000 |
| Subject: | Re: string prints out as number (E+10...), why? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130892@lists.php.net to get a copy of this message | ||
- Edwin wrote:
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...I figured as much. But why? I found a solution by changing the precision of floats in the php.ini file. But I still find it strange that PHP will, internally, happily treat my variable as a string but when it comes time to print it out, it decides that it's a number and formats it without my asking it to. Jc