How to handle number_format output in php?
<p>I am getting the following output correctly:</p>

<pre><code>&lt;?php echo number_format("12312.312","1"); // Correct Output 12312.3 ?&gt;
</code></pre>

<p>but in the following case </p>

<pre><code>&lt;?php echo number_format("12312","1"); // Getting output 12312.0 but requires only 12312 ?&gt;
</code></pre>

<p>So basically, I want to control my output i.e. it should add decimal place only if my decimal digit is greater than 0.</p>
