note 112871 deleted from function.list by cmb
| From: | cmb@php.net | Date: | Wed, 23 Nov 2016 18:49:58 +0000 |
| Subject: | note 112871 deleted from function.list by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207535@lists.php.net to get a copy of this message | ||
Note Submitter: Arne
----
list() will give an error if the input array is too short. This can be avoided by
array_merge()'ing in some default values. For example:
<?php
$parameter = 'name';
list( $a, $b ) = array_merge( explode( '=', $parameter ), array( true ) );
?>