This seems to work for what I need:
$input = "xxxxssworxxxickle";
$wordlist = array("password", "pickle", "passwest", "wordgame", "swords", "orxxx");
$charactercheckcount = 5;
$charactercheckcountoffset = $charactercheckcount-1;
for($x = 0; $x < count($wordlist); $x++) {
$wordlistitem = $wordlist[$x];
$wordlistitemlength = strlen($wordlistitem);
$loop = 0;
while ($loop < $wordlistitemlength-$charactercheckcountoffset) {
$checkstring = substr($wordlistitem, $loop, $charactercheckcount);
$match = strpos($input, $checkstring);
if ($match) {
echo "Match found";
exit();
}
++$loop;
}
}