I like to learn how to combine two associative array which has same keys but different values like how we do in jQuery with var options = $.extend(defaults, options);
$first = array("name"=>"John","last_name"=>"McDonald","City"=>"World"); //default values
$second = array("name"=>"Michael","last_name"=>"Jackson"); //user provided
$result = combine($first,$second);
//output array("name"=>"Michael","last_name"=>"Jackson","City"=>"World");
I am looking for something built-in instead of writing a entire new function to provide this feature. Of course if you have something neat, just let me know.
Thanks...