Arrays

An array is a systematic arrangement of objects, usually in rows and columns. Generally, a collection of data items that can be selected by indices.

An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several different uses; it can be treated as an array, list (vector), hash table (an implementation of a map), dictionary, collection, stack, queue, and probably more. As array values can be other arrays, trees and multidimensional arrays are also possible.

It includes the following –

  • Array Basics
  • Specifying Array
  • Accessing array elements
  • Creating/modifying Array
  • Reading array values
  • Removing array values
  • Array Traversal
  • Useful PHP Array functions