Remove values in array2 from array1


Posted on 16th Feb 2014 07:03 pm by admin

I have two arrays.

Array 1 is where the array key holds various different numbers. For example:
Code: [Select]$array[32] = 1;
Did you know?Explore Trending and Topic pages for more stories like this.
$array[122] = 1;
$array[238] = 1;
$array[324] = 1;

The other array holds values in the same way (but may have less values in total):
Code: [Select]$array[238] = 1;
$array[287] = 1;

I want to simply remove any values in array 2 from array 1 (so now array 1 simply holds 32, 122 and 324).

I am sure there is a quick array command that does this - so I won't need to use a foreach loop.
No comments posted yet

Your Answer:

Login to answer
143 Like 34 Dislike
Previous forums Next forums
Other forums

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

I need desperate help with this php code integrated with flash please
Can someone please help me with this php code which I have been stuck on for weeks . I am trying to

Is it possible to view php source code??
Hi All

I was just wondering if it's possible to view a websites php source code?
I know

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash