What are the differences between htmlspecialchars() and htmlentities(). When should I use one or the other?
htmlspecialchars()
htmlentities()
I just found out about the get_html_translation_table function. You pass it HTML_ENTITIES or HTML_SPECIALCHARS and it returns an array with the characters that will be encoded and how they will be encoded.
HTML_ENTITIES
HTML_SPECIALCHARS