PHP list() Function
Complete PHP Array Reference Manual
Example
Assign the values of an array to some variables:
Run Example »
Definition and Usage
The list() function is used to assign values to a group of variables in one operation.
**Note:** This function only works on numerically indexed arrays.
Syntax
list(
var1,var2...
)
| Parameters | Description |
|---|---|
| var1 | Required. The first variable to assign a value to. |
| var2,... | Optional. More variables to be assigned. |
Technical Details
| Return Value: | Returns the assigned array. |
|---|---|
| PHP Version: | 4+ |
More examples
Example 1
Using the first and third variables:
Run Example »
Complete PHP Array Reference Manual