I have two arrays:
$a = array('a','b','c');
$b = array('b','c','d','e');
What must I do in order to get array ('a','d','e') via array $a and $b?
$a = array('a','b','c');
$b = array('b','c','d','e');
$output = array_merge(array_diff($a, $b), array_diff($b, $a));
I think that is right - is off top of my head.
Yup http://ideone.com/56V0d0 <- fiddle here - seems to work!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With