array_merge_recursive()

array_merge_recursive ( $array1, $array1 ....)
$array1 : Required , Input array 1 .
$array2 : Required , Input array 2 .


Resultant array as output of merging of elements

Example 1

$input1=array(1,2,3,4);
$input2=array(5,6,7);
echo print_r(array_merge_recursive($input1,$input2));
Output is here.
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 ) 1

Example 2

$input1=array("one"=>'first','Second'=>'2nd',3,4);
$input2=array("Five"=>'5th',6,7);
print_r(array_merge_recursive($input1,$input2));
Output is here.
Array ( [one] => first [Second] => 2nd [0] => 3 [1] => 4 [Five] => 5th [2] => 6 [3] => 7 )


plus2net.com




Post your comments , suggestion , error , requirements etc here .




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer