<? $var1 = '10,000'; $var2 = '3.59'; $sum = $var1 + $var2; echo $sum; ?>
I'm getting "13.59"
I'm obviously missing something pertinent to adding numbers with commas.
Any help?
It seems like it treat . and , the same way: a decimal delimiter. If you want numbers without decimals I suggest that you don't use either comma nor point.
If you want to get rid of something treat it as a string and use [man]preg_replace[/man].