Isn't $i initialized with 0 inside the for loop?
it is... but if you test $i < @array and then access elements with an index $i*2, you're accessing elements outside of those you have defined...
In reply to Re: Accessing array elements
by almut
in thread Accessing array elements
by Ravendark
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |