array_merge(array1); More than one arrays value get together
array_merge(array1,array2,array3); this function is use for merge multiple array together. Concept will be clear with an example.
<?php
$arr1 = array("Ball","Bat","Stamp");
$arr2 = array("CPU","Monitor","Keyboard");
echo "<pre>";
print_r(array_merge($arr1,$arr2));
?>
There is two array $arr1 and $arr2. If we want to get those arrays values together we have to use array_merge(); function like that. And you will get all values together.
<?php
$arr1 = array("Ball","Bat","Stamp");
$arr2 = array("CPU","Monitor","Keyboard");
echo "<pre>";
print_r(array_merge($arr1,$arr2));
?>
There is two array $arr1 and $arr2. If we want to get those arrays values together we have to use array_merge(); function like that. And you will get all values together.
Comments
Post a Comment