Skip to content

Glossary: PHP Basics

htmlspecialchars()

Also written: htmlspecialchars

The function that escapes `<`, `>`, `&` and quotes so text from outside prints safely in HTML. Most projects wrap it in a short helper called `e()`.

Where the book teaches it

Related terms

escapingXSS (cross-site scripting)