how merge different arrays code example
Example 1: php combine arrays
$output = array_merge($array1, $array2);
Example 2: js merge 2 lists
var array1 = ["Vijendra", "Singh"];
var array2 = ["Singh", "Shakya"];
console.log(array1.concat(array2));
// output: ["Vijendra", "Singh", "Singh", "Shakya"]