Welcome Guest, Not a member yet? Register   Sign In
Problem with foreach in Model
#5

[eluser]charlie spider[/eluser]
writing
Code:
$output = $some_stuff;
does two things at once.
it declares the variable $output AND it assigns a value to it.

using .= (dot equals) is the same as writing
Code:
$output = $output + $some_stuff;

which doesn't work because the declaration of $ouput hasn't been finalized yet, so basically you can't add some_stuff to something that doesn't exist yet.


Messages In This Thread
Problem with foreach in Model - by El Forum - 01-21-2008, 09:59 PM
Problem with foreach in Model - by El Forum - 01-21-2008, 10:10 PM
Problem with foreach in Model - by El Forum - 01-21-2008, 10:13 PM
Problem with foreach in Model - by El Forum - 01-21-2008, 10:32 PM
Problem with foreach in Model - by El Forum - 01-21-2008, 11:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB