I have two value and I want to do calculation of those values.
For example :
$a = '750,000.00';
$b = '763,000.00';
echo $a + $b;
and I am getting the result 1513 which is wrong.. The output must be 1513000.
How to do such calculations?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to eliminate the commas before the strings are interpreted as float values: