title: Looking for a specific word in a line of text on submit
body: <p>So I have this code: if I type something with a specific word it will show up, for example, <code>if ($_POST['text']</code> it will look for the word smile and convert it to some other text <code>$out_smile</code>. This method works well but when it comes to adding text in between the text like <code>"I love to smile"</code> it won’t recognize <code>"smile"</code> it will recognize it as <code>"I love to smile"</code>. I intuitively know the reason for that. Is there any way to add a string?</p>
  
  <pre><code>if ($_POST['text'] == "Smile") { 
      $out_smile = 'My Code here &lt;img src="URL"&gt;';
  }
  </code></pre>
  
  <p>I want to do something like this. Is it possible to do something like this?</p>
  
  <pre><code> if (Found in the entire $text if there is a word == "smile") { 
      $out_smile = 'My Code here &lt;img src="URL"&gt;';
   }
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>  $Auto_detect_left = "Extra text in the left hand"; //I Dont know how i am gonna do it
    $Auto_detect_right = "Extra text in the right hand"; //I Dont know how i am gonna do it
    $Out_result = ".$Auto_detect_left.$text.$Auto_detect_right;
   if ($_POST['text'] == "$Out_result") { 
      $out_smile = 'My Code here &lt;img src="URL"&gt;';
   }
  </code></pre>