Gold Vision Communications / USA
 GOLDVISION.COM
Serving the Multimedia Community since 1989.
German Site | Spanish Site 

 Web Hosting

 Virtual Dedicated Servers

 Domaincheck

 Order

 Order Status

 Support

 Contact us

 Download

 Network

 Network Status

 Webdesign / Templates

 Make Payment

 Terms & Conditions

 Imprint

 Legal Notices

 Privacy Statement
  PHP / list
list

list

(unknown)

list --  Asigna variables como si fueran una matriz

Descripción

void list ( mixed ...)

Como array(), esta no es realmente una función, sino una construcción del lenguaje. list() se usa para asignar una lista de variables en una sola operación.

Ejemplo 1. Ejemplo de list()

<table>
 <tr>
  <th>Nombre empleado</th>
  <th>Sueldo</th>
 </tr>

<?php

$resultado = mysql($conn, "SELECT id, nombre, salario FROM empleados");
while (list($id, $nombre, $salario) = mysql_fetch_row($resultado)) {
    print(" <tr>\n".
          "  <td><a href=\"info.php3?id=$id\">$nombre</a></td>\n".
          "  <td>$salario</td>\n".
          " </tr>\n");
}

?>

</table>

Vea también: each(), array().


© 1998-2007 Gold Vision Communications All Rights Reserved.