hello, i am working on a very large script that takes information from a .txt document and parses it, places it in email messages and sends them. EVERYTHING works, except my addition script. for some reason a single "," (comma) in a price throws it off. for example the data is $1,234.34 and is added to several other values, however, the total is displayed as a value way below 1,000. its closer to 298.99.
here is the portion of the script that adds the values together, they are placed in the variable $mysubtotal as pure numbers with decimals and the occasional comma. the commas seem to be throwing this off, is there a way to remove them before it gets added.
$mysubtotal = substr($total{$key}, 1);
print "$mysubtotal\n";
$fulltotal += $mysubtotal;
thanks
here is the portion of the script that adds the values together, they are placed in the variable $mysubtotal as pure numbers with decimals and the occasional comma. the commas seem to be throwing this off, is there a way to remove them before it gets added.
$mysubtotal = substr($total{$key}, 1);
print "$mysubtotal\n";
$fulltotal += $mysubtotal;
thanks