title: Checking if sentence contains a word in PHP
body: <p>How can I check if a sentence contains a word. I used names sentence and word instead of string and substring expressly. For example:
  for sentence</p>
  
  <pre><code>$s = "Ala makota, a kot ma przesrane";
  </code></pre>
  
  <p>calling function </p>
  
  <pre><code>checkIfContains("kota",$s) 
  </code></pre>
  
  <p>returns false.</p>
  
  <p>But for </p>
  
  <pre><code>checkIfContains("makota",$s) 
  </code></pre>
  
  <p>returns true.</p>