Tableaux
array array_chunk array_count_values array_diff array_filter array_flip array_fill array_intersect array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_push array_reverse array_reduce array_rand array_shift array_slice array_splice array_sum array_unique array_unshift array_values array_walk arsort asort compact count current each end extract in_array array_search key krsort ksort list natsort natcasesort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort
Description
void list(void)
Tout comme array, list n'est pas une véritable fonction, mais une construction syntaxique, qui permet d'assigner une série de variables en une seule ligne.
<?php<table> <tr> <th>Nom de l'employé</th> <th>Salaire</th> </tr><?php $result = mysql_query($conn, "SELECT id, name, salary FROM employees"); while (list($id, $name, $salary) = mysql_fetch_row ($result)) { print (" <tr>\n". " <td><a href=\"info.php3?id=$id\">$name</a></td>\n". " <td>$salaire</td>\n". " </tr>\n"); }?></table>?>
Voir aussi each et array.