Networking, Programming and Graphics Tutorials

How to use arrays in PHP [1/2]

Type: Code Networking, Programming and Graphics Tutorials
How to use arrays in PHP
Level: Beginner Networking, Programming and Graphics Tutorials 
How to use arrays in PHP
Date: 2007-Mar-15
How to use arrays in PHP
Visited: 2615 times
How to use arrays in PHP
Rating: How to use arrays in PHP
How to use arrays in PHP
Author: Ivory Morhuld

This tutorial will show you how to work with arrays in PHP.

To create an array in PHP use the fowling code:

<?php
$array 
= array();
?>
Each array have one or more elements. Each element have key and value. Values can be arrays too.

Also when you define your array you can fill elements with values like shown in this example. Here the keys are: item, color and size and respective values for this keys are: ball, red and 20.

<?php
$array 
= array('item'=>'ball''color'=>'red''size'=>20);
?>
Networking, Programming and Graphics Tutorials - How to use arrays in PHP [1/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: c++ arrays  what is arrays in c++  what is arrays in c++  c++ arrays  what is a Arrays?  С++ arrays  с++ arrays  c++ arrays of arrays  arrays c++  Arrays of Objects in C++