[thelist] decimal places in PHP
Dave Stevens
stem at stemofficial.co.uk
Tue Aug 20 20:36:01 CDT 2002
--
[ Picked text/plain from multipart/alternative ]
Hi again,
I have a variable, $shipping which is calculated from adding 3 other variables together - $shipW, $shipM and $baseS.
These 3 variables are pulled from a database where each of the corresponding fields are of the type FLOAT(10,2) - as per my question earlier.
However, when I tell the browser to display this $shipping variable, it knocks off any trailing zeroes, e.g:
shipping cost is £2.50, displayed as £2.5
Is there a way to get the cost displayed in the way I require?
Many thanks,
Dave Stevens
--
More information about the thelist
mailing list