On Mar 24, 9:41pm, Damodhar <damu...@gmail.com> wrote:
> hi,
>
> any one say how to insert the value intermediate the array.
>
> for example one array having value like
>
> $name = array(1=>one,2=>two,3=>three,5=>five,6=>six);
>
> i want to insert " 4=>four " in the above array
>
> the result will be come like
>
> $name = array(1=>one,2=>two,3=>three,4=>four,5=>five,6=>si x);
>
> whats the function used for any predefined array functions is there
> for that.
You could add it to the end of the array.
e.g
$name.=array(4=>four);
then use asort($name) to get it in the correct order.
Regards,
Alex
ajtrichards web solutions
www.ajtrichards.co.uk