This may come as a bit of a shock to you, but PHP's arrayfunctions can do a lot more than just count the elements of an array oriterate through key-value pairs. This article takes an in-depth look atPHP's less well-known array manipulation tools, illustrating how they canbe used to write tighter, more efficient code...and have some fun in thebargain as well!
Once an array has been created, it's time to use it. Within the context of an array, the most important (and commonly-used) function is the sizeof() function, which returns the size of (read: number of elements within) the array.
An alternative (and sometimes more efficient) approach to the
one above would be to scan the array for a value match and return the corresponding key. If this is what you need, consider the array_search() function, which is designed just for this purpose:
You can convert array elements into regular PHP variables
with the list() and extract() functions. The list() function assigns array elements to variables,