Array Functions

The most important array functions are list(),each(), and count().

list() is sort of an operator, forming an lvalue (a value that can be used on the left side of an expression) out of a set of variables, which represents itself as a new entity similar to an element of a multidimensional array. As arguments, it takes a list of variables. When something is being assigned to it (a list of variables or an array element), the list of variables given as arguments to the list() operator is parsed from left to right. These arguments are then assigned a corresponding value from the rvalue (a value that's used on the right side of an expression). This is best explained using a code example:

 $result = mysql_db_query($mysql_handle, $mysql_db, ...

Get Web Application Development with PHP 4.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.