Be carefull also with your variable type...
If PHP thinks the variable coming back from your database is a string, then the result of all you + operations will in-fact turn into true or false results.
To illustrate what i mean try the following :
$string1 = "1";
$string2 = "2";
$string3 = $string1 + $string2;
This will actually set $string3 to the numerical value 1 which is equivalent to 'true'
When adding strings you MUST use the . (full stop) operator
$string3 = $string1 . $string2
$string3 will then be "12"
If your taking data from your DB and PHP has reason to make it a string (Remember PHP auto-types it's variables) then you MUST prefix your variable with the desired type. So using the above
$string3 = (int)$string1 + (int)$string2;
will actually then have the desired effect and set the answer to 1 + 2 and save it in $string3 which will then be marked as an integer variable.
$string3 = (int)($string1 . $string2);
Will set $string3 to the integer 12
Hope that helps
Cheers
Shawty