AV1611 Posted February 17, 2009 Share Posted February 17, 2009 I have this statement in a script: $value += $data[$i]; what does += mean? Thanks Quote Link to comment Share on other sites More sharing options...
Lodius2000 Posted February 17, 2009 Share Posted February 17, 2009 http://www.w3schools.com/PHP/php_operators.asp += example: x += y is the same as x = x+y therefore if $value has no value or is 0, then $value = $data, but if $value has a value, then it becomes the sum of itself and $data Quote Link to comment Share on other sites More sharing options...
AV1611 Posted February 17, 2009 Author Share Posted February 17, 2009 http://www.w3schools.com/PHP/php_operators.asp += example: x += y is the same as x = x+y therefore if $value has no value or is 0, then $value = $data, but if $value has a value, then it becomes the sum of itself and $data I looked for hours in the php online manual, but I didn't know what it was called so didn't know how to find it. I had a GD script that was failing and that line was giving a Notice: but I didn't know why. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.