<p>How do you convert a number to a string showing dollars and cents?</p>

<pre><code>eg:
123.45    =&gt; '$123.45'
123.456   =&gt; '$123.46'
123       =&gt; '$123.00'
.13       =&gt; '$0.13'
.1        =&gt; '$0.10'
0         =&gt; '$0.00'
</code></pre>

In PHP and C++ you can use the printf() function
```
```
printf("$%01.2f", $money);
```
```