Forcing two decimal places

I’m reading from a database and outputting data via PHP

I always want to show 2 decimal places. Currently if the number is 1 it shows 1, if its 1.5 it shows 1.5.

How can I force it to show 1.50, 1.00?

I’m already using the ROUND function to round it to two decimal places if it exists.

$newNumber = number_format($number, 2);

With $number containing the number you want to convert

Perfect… I changed my echo statement from:

round($row[avgcond], 2)

to:

number_format(round($row[avgcond],2),2)

and that looks like its working.