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 ,
- Caching of images using javascript image object
- Simple PHP Login Script
- How to display popular posts in wordpress
- .htaccess some facts and rules
- How to create random passwords using php
- Displaying or changing images each day
- Caching of web page using php
- How to install XAMPP
- MD5 Function and Unique ID in php
- Javascript setTimeout() Tricks


Very simple array tutorial