con in_array ho risolto tutto, grazie!