An array is a data structure that stores one or more values in a single value. For experienced programmers it is important to note that PHP’s arrays are actually maps (each key is mapped to a value).
There are three different kind of arrays and each array value is accessed using an ID c which is called array index.
- Numeric array – An array with a numeric index. Values are stored and accessed in linear fashion
- Associative array – An array with strings as index. This stores element values in association with key values rather than in a strict linear index order.
- Multidimensional array – An array containing one or more arrays and values are accessed using multiple indices