Документ взят из кэша поисковой машины. Адрес оригинального документа : http://oit.cmc.msu.ru/php/function.list.html
Дата изменения: Sun Feb 3 22:34:29 2002
Дата индексирования: Mon Oct 1 20:49:16 2012
Кодировка:
list

list

(unknown)

list --  Assign variables as if they were an array

Description

void list ( mixed ...)

Like array(), this is not really a function, but a language construct. list() is used to assign a list of variables in one operation.

Example 1. list() example

<table>
 <tr>
  <th>Employee name</th>
  <th>Salary</th>
 </tr>

<?php

$result = mysql_query ("SELECT id, name, salary FROM employees",$conn);
while (list ($id, $name, $salary) = mysql_fetch_row ($result)) {
    print (" <tr>\n".
           "  <td><a href=\"info.php3?id=$id\">$name</a></td>\n".
           "  <td>$salary</td>\n".
           " </tr>\n");
}

?>

</table>

See also each() and array().