Merge two arrays together using array_merge function



$result = array_merge(array(0=>"Hello"), array(3=>"World"));



The result will have an array with keys got re-numbered
therefore the key 3 will be changed to 1.

If you want to keep your array keys unchanged




$result = $arr1 + $arr2;


That will do it.

0 comments



Some Links (off programming)