difference between two arrays in php

Solutions on MaxInterview for difference between two arrays in php by the best coders in the world

showing results for - "difference between two arrays in php"
Maria José
28 Sep 2016
1
2<?php
3
4 $a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow");
5
6 $a2=array("e"=>"red","f"=>"black","g"=>"purple");
7$a3=array("a"=>"red","b"=>"black","h"=>"yellow");
8
9 
10$result=array_diff($a1,$a2,$a3);
11print_r($result);
12?>
13