confused when to use addslashes and when to use htmlentities
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/2214244/htmlentities-vs-addslashes-vs-mysqli-real-escape-string">Htmlentities vs addslashes vs mysqli_real_escape_string</a><br>
  <a href="http://stackoverflow.com/questions/5770912/when-to-use-which-string-escaping-method">When to use which string escaping method?</a>  </p>
</blockquote>



<p>Hi,
    I get very confused when to use addslashes and when to use htmlentities. </p>

<p>can you please tell me a example where in i should use addslashes and when to use htmlentities.</p>
