php: working with arrays
As a developer you already know that a variable is a bucket in which you can temporarily store a value. Using these values from the bucket you can create a script that stores, processes, and outputs information everytime it is run. Unfortunately, you can only save one value per variable at a time. Arrays are special variables that enables you to overcome this problem. An array can store many values as you want in the same variable. Each value is indexed within the array by a number or string.
Each item in an array is referred to as an element. Each element can be accessed directly via its index. By default, array elements are indexed by numbers, starting at 0. With array you can loop through each item or pull one out at random. You can sort an array numerically, alphabetically or even the way you want it to sort.
Read more >>



