I have two arrays of the same length ($search_type, $search_term). I want to remove any duplicates in the sense of there being searches that have the same type and
Try either array_intersect() which will take two arrays and return an array where a value in array A exists in array B. Or array_diff() which does the opposite and returns an array of all values in A that don't exist in B.