Changes

Jump to: navigation, search

PHP Arrays

678 bytes added, 17:57, 1 June 2007
Accessing Elements in a Multidimensional Array
The echo will output "Wyke" which is in the author column of the second row of the array.
 
== Using Array Pointers ==
 
PHP arrays maintain an internal pointer which records the current element. This popinter can be changed using the ''next'', ''previous'', ''reset'' and ''end'' functions. The ''reset'' and ''end'' function moves the pointer to the first and last elememts of the array respectively. The ''next'' function moves the pointer onm to the next array element. The ''prev'' moves the pointer to the previous array element. The ''next'' and ''prev'' functions return false when it is not possibel to movbe any further in the corresponding direction.
 
Each function takes the name of the array in which the pointer adjustment is to take place as an argument:

Navigation menu