title: How to remove any special character from php array?
body: <p>How to remove any special character from php array?</p>
  
  <p>I have array like:</p>
  
  <pre><code>$temp = array (".com",".in",".au",".cz");
  </code></pre>
  
  <p>I want result as:</p>
  
  <pre><code>$temp = array ("com","in","au","cz");
  </code></pre>
  
  <p>I got result by this way:</p>
  
  <pre><code>$temp = explode(",",str_replace(".","",implode(",",$temp)));
  </code></pre>
  
  <p>But is there any php array function with we can directly remove any character from all values of array? I tried and found only spaces can be removed with <code>trim()</code> but not for any character.</p>