We create array in PHP to solved out the problem of writing same variable name many time.
In this we create a array of variable name and enter the similar variables in terms of element.
Each element in array has a unique key.Using that key we can easily access the wanted element.
Arrays are essential for
operating on sets of variables effectively.
Array are of three types:
1.Numeric array: Numeric array is used to create an array with a unique key
2.Associative array : is used to create an array where each unique key is associated with their value.
3.Multidimensional array : Multidimensional array is used when we declare multiple arrays in an array.