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:
- array in php (1)
- Arrays in PHP (1)
You will also be interested in ,
- Windows XP shortcuts for interner explorer, excel and powepoint
- MD5 Function and Unique ID in php
- How to display popular posts in wordpress
- Calendar Script Using Javascript [Updated]
- Url rewriting examples using .htaccess
- Javascript setTimeout() Tricks
- Simple PHP Login Script
- Get IP address using gethostbyname() function
- Caching of web page using php
- JAVA Simple Tutorial Part-I

Very simple array tutorial