$price = 10.00;
list($dollars, $cents) = explode('.', $price);
echo $dollars . '.' . $cents;
... almost works except that the zeros are omitted. 10.00
becomes 10
and 10.10
becomes 10.1
I see there's a padding function for strings, but anything for numbers or floats?
How do I fix this?