NextIndexPrevious

Programs in PHP

12. Program to merge two arrays into a new array.
<?php

	$arr1 = array('a','b','c');
	$arr2 = array('d','e','f');
	
	$newarr = array_merge($arr1,$arr2);
	print_r($newarr);
	
?>
Output :

Array ( [0] => a [1] => b [2] => c [3] => d [4] => e [5] => f )

Father of PHP

Rasmus Lerdorf

Rasmus Lerdorf

Born: November 22, 1968, Greenland
Google+