This is probably an easy question but I seem to be missing something here. I have a column in a MySql database called Unit_Price. While I read in the row data for screen display I'm also totaling the Unit_Price field to display a grand total at the bottom. I'm using this command inside my WHILE statement:
$unit_total += $Unit_Price['sum'];
Everything works fine as long as I have single digit prices like 2.00, 3.00, etc.. If I have something larger like 50.00, 500.00, or larger, only the first digit (the 5) is being read and added to my total. What am I missing?
$unit_total += $Unit_Price['sum'];
Everything works fine as long as I have single digit prices like 2.00, 3.00, etc.. If I have something larger like 50.00, 500.00, or larger, only the first digit (the 5) is being read and added to my total. What am I missing?