Welcome Guest, Not a member yet? Register   Sign In
Add to object in loop
#2

[eluser]danmontgomery[/eluser]
Foreach creates a copy, use & to assign reference rather than copying the value.

Code:
foreach($parts as &$part) {


Messages In This Thread
Add to object in loop - by El Forum - 09-13-2010, 02:29 PM
Add to object in loop - by El Forum - 09-13-2010, 02:38 PM
Add to object in loop - by El Forum - 09-13-2010, 02:47 PM
Add to object in loop - by El Forum - 09-14-2010, 07:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB