Facebook Twitter Reset

This Tutorial Has Been Viewed 514 Times.

Arrays In PHP

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"]; ?>

 

VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Incoming search terms:




You will also be interested in ,

One Response to “Arrays In PHP”

  1. March 26, 2009 at 9:27 am #

    Very simple array tutorial

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)

Leave a Comment

Spam protection by WP Captcha-Free

Affordable Seo PackagesSeo BlogEdu Backlinks
More in Apache, Html, scripts (28 of 116 articles)