in reply to Manipulating Arrays

Besides the above, also take a look at this Q&A entry for other code: