Easy Tutorial
❮ Func Mysqli Init Php Mysql Delete ❯

PHP list() Function

Complete PHP Array Reference Manual

Example

Assign values from an array to variables:


Definition and Usage

The list() function is used to assign values to a set of variables in one operation.

Note: This function works only with numerically indexed arrays.


Syntax

Parameter Description
var1 Required. The first variable to be assigned a value.
var2,... Optional. More variables to be assigned values.

Technical Details

Return Value: Returns the array that was assigned values.
PHP Version: 4+
--- ---

More Examples

Example 1

Using the first and third variables:


❮ Func Mysqli Init Php Mysql Delete ❯