Well what kind of list is the list in an array? if so you can use if (in_array($element, $arrayname)) {
return TRUE;
}
else {
return FALSE;
}
If you have the list in a text file you can simply read it into an array and do the same as above by using:
$arrayname = file("yourtextfile.txt");