I asked this question yesterday: Compare array of words to a textarea input with javascript
Now I want to do the same thing with php…
Is there any easy code for this?
Thanks
UPDATE: I would like to test the textarea input against the array, and if match of bad words found, die();
Thanks
This will replace bad words with ‘****’
EDIT:
to check if any of words from bad_words exist in a string: