Questions tagged [htmlspecialchars]

htmlspecialchars is a PHP function that convert special characters to HTML entities.

htmlspecialchars is a PHP function that convert special characters to HTML entities.

Famous question: htmlentities() vs. htmlspecialchars()

467 questions
-3
votes
2 answers

Styling outputted code from a database. PHP

I am trying to style my code that is being pulled out from the database. It is multi-lined code stored as a VAR-CHAR on a table "table1". echo "
" . htmlentities($code_display['Code']) . "
"; It displays the…
1 2 3
31
32