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.

Comments

Popular posts from this blog

WP register_post_type() with custom CMB2 meta box

Git post receive setup at server for git push to the production from local machine