note 3419 modified in array_merge by ronabop
| From: | ronabop@php.net | Date: | Sun, 03 Sep 2000 09:35:36 +0000 |
| Subject: | note 3419 modified in array_merge by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3995@lists.php.net to get a copy of this message | ||
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.
http://www.php.net/manual/function.array-merge.php