note 90094 deleted from function.compact by googleguy
| From: | googleguy@php.net | Date: | Wed, 16 Jan 2013 05:25:12 +0000 |
| Subject: | note 90094 deleted from function.compact by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-193085@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Compact does not work with references, but there is a short way to resolve this:
<?php
//$foo=array();
foreach( array('apple','banana') as $v) $foo[$v] = &$v;
?>