Array is used to store value of same data type in a single variable. In PHP, arrays are ordered map means key-value pair, is used to store value in an array where key can be integer or a string. PHP provides following types of arrays.

Indexed ArrayAn array with numeric index.
Associative arrayAn array with key=value pair.
Multi-dimensional arrayAn array with one or more arrays. It is also called Array of Arrays.

Create an array

PHP provide array() to create array.

Syntax

array_name = array(item1,item2,item3,item4);