Working with array_sesarch and comparing two arrays/using loops/foreach