Is there any limitation for integer in javascript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/307179/what-is-javascripts-max-int-whats-the-highest-integer-value-a-number-can-go-to">What is JavaScript&#39;s Max Int? What&#39;s the highest Integer value a Number can go to without losing precision?</a>  </p>
</blockquote>



<p>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:</p>

<pre><code>&lt;?php
$data = $_POST['data'];  // value here is 12345678901234567890
?&gt;
&lt;script&gt;
var d = &lt;?php echo $data ?&gt;
alert(d);  // value here is 12345678901234567000
&lt;/script&gt;
</code></pre>

<p>Any idea why this happens?</p>
