Possible duplicate:
What is Max Int? What is the highest value An integer can go without loss of precision?
Hi, I am assigning a php value (derived from POST) to a javascript variable. When I warn about this value, only 17 digits appear. Rest is replaced by 0. However, when I repeat the message, this is normal. Code below:
<?php
$data = $_POST['data'];
?>
<script>
var d = <?php echo $data ?>
alert(d); // value here is 12345678901234567000
</script>
Any idea why this is happening?
source
share