Here is an example for merging two arrays.And using the array_merge() function in php. array_merge() function is used to concatenate the array values into an single array.
<?php $sample_array1 = array("fruit"=> "apple"); $sample_array2 = array("orange"); $result = array_merge($sample_array1, $sample_array2); print_r($result); ?>
Array ( [fruit] => orange )
Comments :