Downloaded 18 times



![Numeric Array
• An array with numeric index.
$student = array(“abc”=>”123”, “xyz”, “ccc”);
for($x=0; $x < sizeof($student); $x++)
{
echo $student[$x].”<br>”;
}](https://image.slidesharecdn.com/arrayinphp-140523035218-phpapp01/75/Array-in-php-4-2048.jpg)

![Multi Dimensional Array
• An array contain one or more array.
$student=array("punjab"=>array("jalandhar","phagwara","ludhiana"),
"haryana" => array("ambala","hisar"));
• echo $student["punjab"][0];](https://image.slidesharecdn.com/arrayinphp-140523035218-phpapp01/75/Array-in-php-6-2048.jpg)

This document discusses the different types of arrays in PHP. There are three main types: numeric arrays which use numeric indices, associative arrays where each key is associated with a value, and multi-dimensional arrays which contain one or more nested arrays. Examples are provided for each type to demonstrate how to define and access array elements.



![Numeric Array
• An array with numeric index.
$student = array(“abc”=>”123”, “xyz”, “ccc”);
for($x=0; $x < sizeof($student); $x++)
{
echo $student[$x].”<br>”;
}](https://image.slidesharecdn.com/arrayinphp-140523035218-phpapp01/75/Array-in-php-4-2048.jpg)

![Multi Dimensional Array
• An array contain one or more array.
$student=array("punjab"=>array("jalandhar","phagwara","ludhiana"),
"haryana" => array("ambala","hisar"));
• echo $student["punjab"][0];](https://image.slidesharecdn.com/arrayinphp-140523035218-phpapp01/75/Array-in-php-6-2048.jpg)