comparing arrays when one is empty

From: John Smith (kevin4205_at_comcast.net)
Date: 02/27/05


Date: Sun, 27 Feb 2005 04:45:25 -0800

I have two arrays. I tried using array_diff to see which info in one did
not exist in the other and it worked fine, but if one of the arrays had no
value, array_diff returned nothing. How do I make it so that if $a =
apples, oranges, pears and $b is null or nothing I will get apples, oranges,
pears when I try to find the difference in the arrays?

Kevin



Relevant Pages