need help cleaning data in $_POST array
<p>this doesn't work.  When I enter html into the form.  For instance when I enter a horizontal rule it displays in the echo output even though the $value was passed through strip_tags.</p>

<pre><code>function sanitizeString($var){
   $var = strip_tags($var);
   $var = htmlentities($var);
   return stripslashes($var);
}

foreach($_POST as $key =&gt; $value){
   echo $key."&lt;br&gt;";
   sanitizeString($value);
   echo $value."&lt;br&gt;";
} 
</code></pre>
