PHP

Escape output

Print text from the database or a form with htmlspecialchars.

function e($value) {
    return htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8');
}

All snippets