if (index('abcdefghijklm', $sorted_values) > -1) { # Do stuff... }