D
D
Dmitry2014-08-24 11:52:42
PHP
Dmitry, 2014-08-24 11:52:42

How can I check an array like this?

There is an array A = [0=>1, 1=>2, 2=>3, 3=>4...]. There is also an array B = [0=>3, 2=>1...];
Array B can be of different sizes, from no elements to 999 el.
Question:
How to check array A for the presence of elements similar in value to array B and remove them from array A?
There is, it seems, a solution through foreach, etc., but I would like to know if there is another way? For example f-I array_filter? Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question