@John: You have to make sure $var is an array before you can use array_intersect. If you pass a non-array, it will throw an error.