title: PHP need to trim all the $_POST variables
body: <p>Need you help in an unusal situation. I need to trim all the $_POST variables.</p>
  
  <p>Is there any way I can do it at a single shot i.e., using a single function?</p>
  
  <p>I know trim($_POST) won't do, I have to make some function like</p>
  
  <pre><code>function sanatize_post(){
      foreach ($_POST as $key =&gt; $val)
          $_POST[$key] = trim($val);
  }
  </code></pre>
  
  <p>But, if you have any other suggestion or comment, please help me.</p>
  
  <p>Thanks</p>