I have the following code...
while ($row2 = mysql_fetch_array($results2))
{
$total_sales=$row2[sales];
$turns_year=number_format($total_sales/$inv_total, 2);
$turns_week=number_format(($turns_year/52), 2);
}
The turns_week works perfect...
But the turns_year displays incorrectly it show three additional decimal places to the screen than it should..(instead of showing 59.20 it shows 5,920.72).even though when used to calculate turns_week it works fine and outputs 1.xx).
Both $total_sales and $inv_total are MySQL decimal data types (14,2)
ANy Ideas?