Looping through an array

This… will probably not do what you want it to do. Try tracing your variables to see why.

Is this not the same question you had last week? (Create a new array based on another)