hello,
I have two arrays. My first array is $user_member_of = ["it_support","human_resources"] and my second is $file_posted_for = ["1","administration","human_resources","5","19"]. What I need to do is check if any of the values from my first array are in the second array. I used to use in_array(), but that was when $user_member_of was a string... it doesn't work with an array.
Any help is appreciated!!!
Thanks,
- Jeff
comparing an array to an array
Moderator: General Moderators
-
ibanez270dx
- Forum Commoner
- Posts: 74
- Joined: Thu Jul 27, 2006 12:06 pm
- Location: Everywhere, California
Re: comparing an array to an array
Last edited by VladSun on Fri Jun 13, 2008 7:28 pm, edited 1 time in total.
There are 10 types of people in this world, those who understand binary and those who don't
-
ibanez270dx
- Forum Commoner
- Posts: 74
- Joined: Thu Jul 27, 2006 12:06 pm
- Location: Everywhere, California
Re: comparing an array to an array
EXACTLY what I was looking for! Thanks!!