2

I have 2 arrays one retrieved from a database (saved results) and the other from an xml (new results)

$fromDB = array('123','124','524','15','616');
$fromXML = array('123','124','524','15','818');

I want to compare those two and see which values are old (fromDB) and which are new (fromXML) so to insert the old value in a different table.

How can I achieve this?

0

2 Answers 2

3

The array_diff function is what you're looking for.

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

Comments

2

Take a look at the array_diff() function

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.