I've got this if statement that checks for these "Offensive words" in an input of types = text
if(strstr($key,'bi**h') || strstr($key,'fu**k') || strstr($key,'son of a bit**') || strstr($key,'cun*') || strstr($key,'fuc**r') || strstr($key,'mother fuc**') || strstr($key,'shi**') || strstr($key,'cr**p') ){
$erros['insult']='please avoid any offending words';
}
This code is made by another developer, I was just wondering is there any more way other than adding the double pipes for each word I have to enter?. It kinda looks a primitive way of writing such a code, I guess.