issue in reversly printing a number in php
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8583397/what-does-a-leading-zero-do-for-a-php-int">What does a leading zero do for a php int?</a>  </p>
</blockquote>



<p>I am just a beginner in php. I tried to write program for print the given number as reverse. For example if i use 123 as input the result should be 321. I tried the following code. It works fine. But if the given input is 0123 the output is 38. I couldn't correct it. How can i correct my code? here is my code.</p>

<pre><code>&lt;?php
$n=123;
$b=0;
while($n&gt;=1)
{
    $b=$b*10+$n%10;
    $n=$n/10;
}
echo $b;
?&gt;
</code></pre>
