title: Will mysql_real_escape_string() cancel out stripslashes()?
body: <p>I am having users enter some information that will be stored in sql.  Of course I want to escape all the quotation marks and such.. but i don't want that stuff to be outputted into the final html either.</p>
  
  <p>I'm running this function for all $_POST variables.  Is it valid?</p>
  
  <pre><code> function cleanArray($array)  //prevent funky insertions
  {
  foreach ($array as &amp;$value)
  {
      $value = mysql_real_escape_string(stripslashes(nl2br($value)));
  }
  return $array;  
  }
  </code></pre>
  
  <p>I'm worried about the escape string and stripslashes cancelling eachother out?</p>