Arrays in PHP
In PHP array is a collection of key and value pairs. Unlike C++, in PHP we can use either non negative integers or strings as keys.
Different types of arrays in PHP
- Indexed arrays
- Associate arrays
- Multi dimensional arrays.
1. Indexed arrays:
The elements in an array can be distinguished as first or second or third etc. by the indices and the index of the first element is zero. In PHP the function array() is used to create an array.
Syntax:
$array_name=array(value1 ,value2,……….);
OR

2 Associative arrays
Arräys with named keys and string indices are called associative arrays.
