title: PHP How to filter 'in a correct way' All $_POST variables
body: <p>Using Netbeans, whenever i try to access a variable in $_POST or $_GET, i'm adviced to use something like: <code>filter_input(INPUT_POST,'id')</code>, for 'safety' (i don't think it's any safer than using filter_input with the default NON filter, but anyways..).</p>
  
  <p>This got me thinking about the answer to this post: <a href="https://stackoverflow.com/questions/3058336/how-to-grab-all-variables-in-a-post-php">How to grab all variables in a post (PHP)</a></p>
  
  <p>There you have:</p>
  
  <pre><code>foreach ($_POST as $key =&gt; $value) {
      //do something
      echo $key . ' has the value of ' . $value;
  }
  </code></pre>
  
  <p>filter_input() only works for individual variables inside $_POST</p>
  
  <p>My question is, How can i re-write "<code>$_POST as $key</code>" with filtering to fit this supposed access standard that NetBeans is telling me about?.</p>