On Thursday, March 7, 2002, at 05:50  PM, Bradley Goldsmith wrote:

>       Ive got an array of associations like this:
>       [1]=>2 [2]=>3 [3]=>4 etc
>       I want to add a new element [8]=>6.
>       How do I do this? I have tried several ways: pushing the element,
> merging arrays, etc with no luck (it either increments the key or 
> doesn't
> work at all).

Have you tried just directly setting this array element?  You don't say 
what your array is named, so I'll call it $array.

$array[8] = 6;

Is that what you are talking about?



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to