note 97074 modified in function.list by thiago
| From: | thiago@php.net | Date: | Wed, 31 Mar 2010 14:05:01 +0000 |
| Subject: | note 97074 modified in function.list by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-167557@lists.php.net to get a copy of this message | ||
Remember, that list starts from index 0. You can skip an index if you just leave the column blank
like this:
<?php
list(,$a,$b,$c) = array(1,2,3,4);
?>
You CAN'T (at least not in 5.3.1, what I have tested) set the column to null:
<?php
list(null,$a,$b,$c) = array(1,2,3,4);
?>
This will fail.
--was--
Remember, that list starts from index 0. You can skip an index if you just leave the column blank
like this:
list(,$a,$b,$c) = array(1,2,3,4);
You CAN'T (at least not in 5.3.1, what I have tested) set the column to null:
list(null,$a,$b,$c) = array(1,2,3,4);
This will fail.
http://php.net/manual/en/function.list.php