R4R Team working to provide free of cost for experienced and freshers

Tutorials | Examples|Interview Questions and Answers|Java Tutorials| C Tutorials | C++ Tutorials | Spring Tutorials| Hibernate Tutorials | JSP Tutorials | Servelets Tutorials| C# Tutorials | PHP Tutorials etc , Basics | Download Software | Data Types | Variables | Constant | Storage & Classes | Operators | Decisions Making | Loops | Functions| Numbers | Arrays | Pointers | String | Datastructure | Expressions | Preprocessor Statement | I/O | Exception Handling | OOPs Tutorial | Classes and object |C++ Inheritance Overloading | Polymorphism | Abstraction | Encapsulation | Interfaces | Multithreading etc

PHP Programing language

array_merge() Function in PHP
Previous Home Next

array_merge()

The array_merge() function merges or combine one or more arrays into another array.

Syntax:
array_merge(array1,array2,array3...)

In above syntax,"array1" specifies an array, "array2" specifies an array and "array3,..." specifies an array

Example:

<?php
$array1=array("Apple","Banana");
$array2=array("Orange","Mango");
print_r(array_merge($array1,$array2));
?>

Output:

Array ( [0] => Apple [1] => Banana [2] => Orange [3] => Mango )

Previous Home Next