You may find sprintf('%.2f', $decimalnumber) will work for you.
More info here: http://us4.php.net/sprintf
If you wanted, you could include the dollar sign too: sprintf('$%.2f', $decimalnumber)
Of if you wanted some padding if the value is below a dollar: sprintf('%01.2f', $decimalnumber)
Something to ponder is sprintf() just lobs off the end of the decimal value. Which for what you asked for, will work. But you're working with money and thats money you're chopping off. You may want to round up if there's a fractional value. Such as:
$number = 10.56789; // ugly money value
$money = ($number * 100); // move decimal over: 1056.789
$money = ceil($money); // always round up: 1057.
$money /= 100; // move the decimal back over: 10.57
$money = sprintf('$%01.2f', $money); // format it to look pretty: $10.57
There's a couple steps that you can mix together to form 1 line, but I left them on seperate lines for clarity.