note 3419 deleted from function.array-merge by sniper
| From: | sniper@php.net | Date: | Mon, 06 Oct 2003 22:56:31 +0000 |
| Subject: | note 3419 deleted from function.array-merge by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57929@lists.php.net to get a copy of this message | ||
Note Submitter: rlynch@ignitionstate.com
----
The behavior of the integer-based arrays seems in direct opposition to the ability to be able to
have integer-based arrays with holes in them:
$alpha = array(65 => 'A', 66 => 'B', 67 => 'C');
$assoc = array(65 => 'Retire', 66 => 'Route');
$merge = array_merge($alpha, $assoc);
This wipes out the association I had going and re-indexes from 0 :-(
Maybe I'm just goofy, but this seems against the flavor of PHP to me.
At any rate, it's something folks should know.