September 2001
Intermediate to advanced
768 pages
32h 45m
English
void list(mixed varname, mixed ...) Populates a list of variables with the values of an array.
Returns:
Not applicable.
Description:
This is perhaps the strangest construct (it’s not really a function) in the PHP language; it’s the only one that’s intended to appear on the left side of an assignment statement. To use list(), you place a comma-separated list of variables (which need not exist beforehand) into the argument list, and then assign the value of an array to list(). Each variable listed is then populated with the value of the corresponding element from the array.
If there are more elements in the array than variables listed, the extra elements are ignored.
If there are more variables listed than elements in the array, a warning ...
Read now
Unlock full access