how to add two array in single array without repetation in php

Solutions on MaxInterview for how to add two array in single array without repetation in php by the best coders in the world

showing results for - "how to add two array in single array without repetation in php"
Elena
07 Sep 2019
1<?php
2	$array1=array("CPU","Mouse","Monitor");
3	$array2=array("Key-Board","Monitor","Printer");
4	$array = array_unique(array_merge($array1, $array2));
5	print_r($array);
6?>
7