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.
In reply to Re: Re: Re: Changing each item in an array
by diotalevi
in thread Changing each item in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |