Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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

<?php
	$array1=array("CPU","Mouse","Monitor");
	$array2=array("Key-Board","Monitor","Printer");
	$array = array_unique(array_merge($array1, $array2));
	print_r($array);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: how to calculate age in laravel 
Php :: a2dismod php 8.0 
Php :: php get next saturday 
Php :: laravel firstorfail 
Php :: rewrite .php to no extension 
Php :: ubuntu php uninstall 
Php :: opencart order change status 
Php :: Delete Query with Where Condition in Codeigniter 
Php :: php version 
Php :: carbon start of week minus one day 
Php :: create laravel project with composer 
Php :: You must enable the openssl extension in your php.ini to load information from https://repo.packagist.org 
Php :: PHP Warning: require(/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/api-fase/bootstrap/autoload.php on line 17 
Php :: convert one time zone datetime value to another using php 
Php :: change php version on mac 
Php :: print all session variables php 
Php :: get image extension in php 
Php :: php get array average 
Php :: Laravel get only the Ids of an eloquent arrays 
Php :: select distinct laravel 
Php :: get user ip in php 
Php :: install php 7.4 on ubuntu 20.04 
Php :: Unable to locate publishable resources. Publishing complete. 
Php :: count object php 
Php :: laravel test assert redirecto to 
Php :: php delete array item by value not key 
Php :: How to always use ignore-platform-reqs flag when running composer? 
Php :: php force array keys to lowercase 
Php :: laravel withtrashed 
Php :: how to get last array element in php 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =