Hi all i need help wotking something out.
in my database i have a field. init_price and the field is a FLOAT 10,2.
couple of recordsi have in there look like this.
10.50
52.00
(they are prices)
what i need to do is work out GST (Tax) on them
so.
10.50 * .10 = 1.05
10.50 + 1.05 = 11.55
i then need to print that 11.55.
how do i do this.
i tried
$init_price = $line [init_price];
$my = (int)($init_price * .10);
echo $my;
but it comes out like this.
11.000000 ment to be 1.05
cheers aron.