On Mon, 06 Aug 2001, Peter Lowe wrote:
> I agree, you *should* preserve all elements of the input array in the
> output one, one of those elements being the key.
>
> it actually says on the man page:
>
> If, however, the arrays have the same numeric key, the later
> value will not overwrite the original value, but will be appended.
>
> if the values get appended, why renumber numeric keys from 0?
What would you have them start with? :)
Imagine this scenario:
$array1 = array('a', 'b', 'c');
$array2 = array(2=>'d', 3=>'e', 4=>'f');
$result = array_merge($array1, $array2);
In this case, $result is:
Array
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => e
[5] => f
)
What should it look like according to you?
-Andrei
We all have photographic memories, it's just
that some of us don't have any film.
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]