Archive for October, 2008

Arrays in PHP - Tutorial

October 21, 2008

What is an array?

In computer science an array is a data structure consisting of a group of elements that are accessed by indexing. In most programming languages each element has the same data type, in PHP however each element can be a different data type. Each element of an array has a unique identifying index number. Changes made to one element of an array do not affect the other elements.

The syntax of an array is almost identical to the syntax of other variables in PHP. It follows the same rules regarding variable names, and can be referenced in the same way as any other variable. There are, however, differences in how the data within an array is accessed and how an array is created.

Click to continue reading “Arrays in PHP - Tutorial”