if you used htmlentities() and then inserted it into your database, the raw output from htmlentities() will be stored in your database ('&lt;' for '<' and '&gt;' for '>').

however, the browser will not show the raw output to the user (unless they're viewing the source), but rather will parse the special characters as readable characters. so, "&lt;" changes to "<" and "&gt;" changes to ">", for example. if you view the source, though, you will see the raw output that the database has stored.

make sense?