AV1611 Posted February 17, 2009 Share Posted February 17, 2009 I have this statement in a script: $value += $data[$i]; what does += mean? Thanks Link to comment https://forums.phpfreaks.com/topic/145517-solved-what-does-this-mean/ 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 Link to comment https://forums.phpfreaks.com/topic/145517-solved-what-does-this-mean/#findComment-763995 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. Link to comment https://forums.phpfreaks.com/topic/145517-solved-what-does-this-mean/#findComment-764372 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.