0

i have a array of values

(array 1)
array:22 [▼
  0 => 1
  1 => 2
  2 => 3
  4 => 5
  5 => 8
  6 => 9
  7 => 10
  8 => 11
  9 => 12
  10 => 15
  11 => 16
  12 => 17
  13 => 18
  14 => 19
  15 => 22
  16 => 23
  17 => 24
  18 => 25
  19 => 26
  20 => 29
  21 => 30
  22 => 31
]

and another array of values like

(array 2)
[0=>01
1=>02
2=>03
3=>04
......
]

i want to match the first array with second array and if the values matches remove that (key=>value) from first array

4
  • have you bothered to look at array_diff()? Commented Jan 31, 2018 at 14:43
  • Have you even made an attempt to do anything? Post your code so far. Commented Jan 31, 2018 at 14:43
  • 1
    I was looking for 'Possible duplicate of - what have you tried so far' Commented Jan 31, 2018 at 14:44
  • 1
    And note that the sequence 01, 02, 03, 04, etc gets quite interesting when you get to 08 and 09 Commented Jan 31, 2018 at 14:44

1 Answer 1

0

array_diff() is suitable for your requirement

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.