Homersim2600
Technical User
Hello,
I am a noobie to PHP migrating from Visual Basic. I know that in VB a programmer can add a number to itself, and then store the result inside of itself all in the same line. My question is, I am able, to some extent, to get PHP to do the math, but then I receive an error, "variable not defined" Is there a 'proper' way to perform the function $a = $a + $b ?
What I am doing is pulling data from a MySQL database and adding all of values from a specified field in the database together to get a grand total. So, is there an alternative way to go about this without having to worry about my main query to you folks?
Thank you all for your insight.
LF
"As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality."--Albert Einstein
I am a noobie to PHP migrating from Visual Basic. I know that in VB a programmer can add a number to itself, and then store the result inside of itself all in the same line. My question is, I am able, to some extent, to get PHP to do the math, but then I receive an error, "variable not defined" Is there a 'proper' way to perform the function $a = $a + $b ?
What I am doing is pulling data from a MySQL database and adding all of values from a specified field in the database together to get a grand total. So, is there an alternative way to go about this without having to worry about my main query to you folks?
Thank you all for your insight.
LF
"As far as the laws of mathematics refer to reality, they are not certain; as far as they are certain, they do not refer to reality."--Albert Einstein