Journal dthable's Journal: [PHP] Working with Arrays 2
I've been working on this application that requires adding a key value pair to an existing dictionary. The quick solution I found was:
$one = array( 1 => "one", 2 => "two");
$two = array( 3 => "three", 4 => "four");
$new = array_merge( $one, $two);
Is there some way to just append without the merge? While array_merge works in this case, what if I just want to append a single item? Also, is there an OO implementation of an array? I'd like to be able to say $new->sort() instead of using a function.
what if (Score:2)
Re: (Score:1)