title: How to: compare array elements with a String
body: <p>I have predefined an array:</p>
  
  <pre><code>$tags = array('PHP', 'Webdesign', 'Wordpress', 'Drupal', 'SQL');
  </code></pre>
  
  <p>Now I am inputting a value into a text area:</p>
  
  <pre><code>$text = 'Working With Wordpress Shortcodes and doing some NoSQL and SQL';
  </code></pre>
  
  <p>How can I compare the string value with the predefined array?</p>
  
  <p>The desired result I want based on the above is 'Wordpress' and 'SQL'</p>
  
  <p>Can I do it in PHP and JQuery?</p>
  
  <p>Also, if it will contain a regular expression like</p>
  
  <pre><code>Working With Wordpress; Shortcodes: and doing some NoSQL and ""SQL
  </code></pre>
  
  <p>Then what to do?</p>