Or you could try number_format.
<?
$valuein=100;
$formated_number=num_format($valuein, 2, ".", ",");
echo $formated_num;
?>
This will not only put two decimal places but will also comma the thousands. For 1100 the sprintf version will only show 1100.00 but the number_format way shows 1,100.00.
Mark.