javascript or php array intersection and difference method
<p>I am looking for an error free code for getting unchanged, added, and removed items array by comparing two array.</p>

<p><img src="http://i.stack.imgur.com/QG0ba.jpg" alt="enter image description here"> </p>

<p>Is there any efficient method to obtain three arrays by using a single method ?</p>

<p>both php or javascript can be used</p>
