title: Check if string contains words from array
body: <p>I have a <code>script</code> below that detects for words in my word filter (an array), and determines whether a <code>string</code> is clean or not.</p>
  
  <p>What I have below works well when the words are used with spacing. But <code>ifiwritesomething</code> without spaces, it doesn't detect.</p>
  
  <p>How can I make it such that it searches the whole string instead of words? I tried removing the <code>explode</code> function but I got some errors...</p>
  
  <pre><code>$string = 'goodmorningnoobs';
  $array = array("idiot","noob");
  if(0 == count(array_intersect(array_map('strtolower', explode(' ', $string)), $array))){
  
  echo"clean";
  
  } else {
  
  echo "unclean";
  
  }
  </code></pre>
  
  <p>Can anyone help?</p>