in reply to Re: Re: Changing each item in an array
in thread Changing each item in an array

No, foreach doesn't create a reference and dereference for you. Really. Its an internals thing and it *aliases* the loop variable. This is really outside the bounds of what I think will confuse the original poster though. I also would normally have used ternary assignment but, again, in the interests of speaking to the original poster's knowledge level I kept the same if/else syntax and just changed the bits that needed to be.

  • Comment on Re: Re: Re: Changing each item in an array