PHP/Development/list

Материал из Web эксперт
Перейти к: навигация, поиск

list and explode

<?php
$line = "A|c|d";
list ($name, $occupation, $color) = explode ("|", $line);
print "Name: $name <br />";
print "Occupation: $occupation <br />";
print "Favorite color: $color <br />";
?>



list: Print all server variables

<?php
   while (list($var,$value) = each ($_SERVER)) {
      echo "$var => $value <br />";
   }
?>