Octavian Rasnita wrote:
Well, that big number is not converted as a string and printed this way, or
I am missing something.

Here is an example:

<?php
$var = 1000000000000;
//Here I have also tried inserting $var = (string) $var;
echo "$var";
?>

This prints:

1E+012

and... not 1000000000000 as it should.

I have first tried just echo $var, but I thought that maybe if I put it
between quotes, it will be printed right, but...


If you do:

$var = '1000000000000';
echo $var;

it will print fine, but you can't do any math operations on it or it will get converted to float again.

You can use BCMath functions, if available.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to