How to get difference between two or more arrays in PHP?

General discussion on PHP

How to get difference between two or more arrays in PHP?

Postby john2839 on Tue Dec 20, 2016 6:25 am

Hi everyone, I am a beginner and have been learning various programming languages like PHP, DotNet, Java etc. I faced an issue regarding php programming in which I wanted to learn how we can find out the difference between two or more arrays based upon key and value of arrays. I have shared many queries in php developer forum & received fruitful results, so hoping a great support to my query in this community too grabbitmedia com
john2839
 
Posts: 2
Joined: Tue Dec 20, 2016 6:18 am
Location: lahore,pakistan

Re: How to get difference between two or more arrays in PHP?

Postby web4719 on Tue Nov 14, 2017 9:24 am

Your questions in not clear first of all


For more help Visit Website development company in Gurgaon webdecorum
web4719
 
Posts: 3
Joined: Sat Aug 19, 2017 12:13 pm

Re: How to get difference between two or more arrays in PHP?

Postby dina3330 on Sat Dec 09, 2017 8:06 am

Add this simple line of code in your program:
array array_diff ( array $array1 , array $array2 [, array $... ] )

Compares array1 against one or more other arrays and returns the values in array1 that are not present in any of the other arrays.
dina3330
 
Posts: 2
Joined: Sat Dec 09, 2017 8:05 am

Re: How to get difference between two or more arrays in PHP?

Postby lisa9638 on Mon Dec 11, 2017 8:04 am

This kind will at all times be mapped to the database vendor’s manuscript sort within as there is no way of store a PHP assortment depiction natively in the database.
lisa9638
 
Posts: 1
Joined: Mon Dec 11, 2017 7:58 am
Location: United Kingdom


Return to PHP

Who is online

Users browsing this forum: No registered users and 4 guests