number_format and sprintf for same variable
<p>How can I have two leading zeros and two decimal places for the same number. I tried the code below but only number_format or sprintf seems to work (they don't seem to work together)   </p>

<pre><code>sprintf("%04d", number_format((float)$height, 2, '.', ''))
</code></pre>

<p>The above code returns 0025 instead of 0025.00</p>