PHP list() Function

PHP list Function


Defintion :

In php Array functions the list() function assign variables as if they were an array.
Like array(), this is not really a function, but a language construct. This function is mainly used to assign a list of variables in one operation. It doesn't work with strings.

Syntax

The basic syntax of the list() function is given with:

    list(variable1variable2, ...);

Parameters

The list() function accepts the following parameters.

Parameter Description
variable1 Required. Specify a variable to assign a value to.
variable2, ... Optional. Specify more variables to assign values to.

Example : Given below example assigning variable

Output : Start study with Web Designing House .

 Example2 : Assign variables ony "first" and "third".

Output : This is an Apple device with 128GB internal storage.