The array_merge function merges one or more arrays

    
    $colors = array("red","green");
    $colors1 = array("blue","yellow");
    $colors2 = array_merge($colors, $colors1);
    print_r($colors2);
    // Array ( [0] => red [1] => green [2] => blue [3] => yellow )