Why use an array?

Recently, I asked myself the same question. You might be wondering, what is an array. According to Wiki:

In computer science an array [1] is a data structure consisting of a group of elements that are accessed by indexing.

What does that really mean? Well, I’ll explain by using an example I got off one of the programming forums I frequent, SamponVideos.com. I will actually quote some of Johnathan Sampson’s message because it captures the idea. In his example, if you were creating a an image uploader, and you did not want to allow executable files, you would do something like this: