There are two types of arrays we deal with in PHP.
- Numeric Arrays
<?php $employee_names[0] = "Raj";
$employee_names[1] = "Thomas";
$employee_names[2] = "Anil";
echo "The first employee's name is ".$employee_names[0];
echo "<br>";
echo "The second employee's name is ".$employee_names[1];
echo "<br>"; echo "The third employee's name is ".$employee_names[2]; ?>
Associative Array
<?php $employee_names = array("arun" => "Owner", "balu" => "Manager", "Thomas" => "Peon");
echo "Matt is the ".$employee_names["balu"]; ?>
Incoming search terms:
You will also be interested in ,
- Get IP address using gethostbyname() function
- Display Tags in wordpress
- How to display popular posts in wordpress
- Displaying or changing images each day
- Windows XP shortcuts for interner explorer, excel and powepoint
- Javascript setTimeout() Tricks
- Simple PHP Login Script
- .htaccess some facts and rules
- Simple Javascript Slideshow
- How to install XAMPP


Very simple array tutorial