PHP show only digits after decimal point
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/50801/whats-the-best-way-to-get-the-fractional-part-of-a-float-in-php">What’s the best way to get the fractional part of a float in PHP?</a>  </p>
</blockquote>



<p>I want to use PHP code to do the following:<br>
Change <code>30.51</code> to <code>0.01</code></p>

<p>and also<br>
<code>30.51</code> to <code>0.51</code></p>

<p>and also<br>
<code>30.51</code> to <code>1</code></p>

<p>Both come from a POST, so they are both <b>PHP strings</b>.</p>
