fast way to check if element is in sql value code example
Example 1: php check if item in array
$allowedFileType = ['application/vnd.ms-excel','text/xls','text/xlsx','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
if(in_array($_FILES["file"]["type"],$allowedFileType))
Example 2: python check if value in string
def is_value_in_string(value: str, the_string: str):
return value in the_string.lower()