1$info = array('Doina', 'brown', 'long');
2
3// Listing all the variables
4list($she, $color, $hear) = $info;
5echo "$she has $color eyes color and $hear black hair.\n";
1
2<?php
3
4$info = array('coffee', 'brown', 'caffeine');
5
6// Listing all the variables
7list($drink, $color, $power) = $info;
8echo "$drink is $color and $power makes it special.\n";
9
10// Listing some of them
11list($drink, , $power) = $info;
12echo "$drink has $power.\n";
13
14// Or let's skip to only the third one
15list( , , $power) = $info;
16echo "I need $power!\n";
17
18// list() doesn't work with strings
19list($bar) = "abcde";
20var_dump($bar); // NULL
21?>
22
23