list() assigns the values starting with the right-most
parameter. If you are using plain variables, you don't have to worry
about this. But if you are using arrays with indices you usually expect
the order of the indices in the array the same you wrote in the
list() from left to right; which it isn't. It's
assigned in the reverse order.
Example 3. Using list() with array indices
<?php
$info = array('coffee', 'brown', 'caffeine');
list($a[0], $a[1], $a[2]) = $info;
var_dump($a);
?>
Gives the following output (note the order of the elements compared in
which order they were written in the list() syntax):
list php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php list syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.