Possible Duplicate:
What is JavaScript's Max Int? What's the highest Integer value a Number can go to without losing precision?
Hi, I am assigning a php value(obtained from POST) to a javascript variable. When I alert this value,only 17 digits appear. Rest are replaced by 0. However when I echo the post it is fine. The code is below:
<?php
$data = $_POST['data']; // value here is 12345678901234567890
?>
<script>
var d = <?php echo $data ?>
alert(d); // value here is 12345678901234567000
</script>
Any idea why this happens?