LIST is not really a function, but a language construct. list() is used to assign a list of variables in one operation. LIST Assign variables as if they were an array
$info = array('coffee', 'brown', 'caffeine');
// Listing all the variables
list($drink, $color, $power) = $info;
echo "$drink is $color and $power makes it special.\n";
below is the an example of useof LIST function
<table>
<tr>
<th>Employee name</th>
<th>Salary</th>
</tr>
<?php
$result = $pdo->query("SELECT id, name, salary FROM employees");
while (list($id, $name, $salary) = $result->fetch(PDO::FETCH_NUM)) {
echo " <tr>\n" .
" <td><a href=\"info.php?id=$id\">$name</a></td>\n" .
" <td>$salary</td>\n" .
" </tr>\n";
}
?>
</table>