title: How to remove single and double quotes from a string
body: <p>When I run a phrase that contains double quotes through this function, its replacing the quotes with quot.</p>
  
  <p>I want to completely remove them (also single quotes). How can I alter the function to do that?</p>
  
  <pre><code>function string_sanitize($s) {
      $result = preg_replace("/[^a-zA-Z0-9]+/", "", $s);
      return $result;
  }
  </code></pre>
  
  <p>Update:</p>
  
  <pre><code>Example 1: This is 'the' first example 
  returns: Thisis030the039firstexample 
  Errors: Warning: preg_match_all() [function.preg-match-all]: Unknown modifier '0' in C
  
  
  Example 2: This is my "second" example
  returns: Thisismyquotsecondquotexample
  Errors: Invalid express in Xpath
  </code></pre>