You should only call this method when echoing the data into HTML.
Don’t store escaped HTML in your database; it will just make queries more annoying.
The database should store your actual data, not its HTML representation.
More Related Contents:
- Using htmlspecialchars function with PDO prepare and execute
- What do the ENT_HTML5, ENT_HTML401, … modifiers on html_entity_decode do?
- How to display special characters in PHP
- How I can display image from mysql into table in php
- do not include AcmeDemoBundle using symfony installer
- How and where to put Jquery into a fully PHP page?
- Among $_REQUEST, $_GET and $_POST which one is the fastest?
- Htaccess: add/remove trailing slash from URL
- Check if cookies are enabled
- How to test if a MySQL query was successful in modifying database table data?
- How can I echo or print an array in PHP?
- php: sort and count instances of words in a given string
- PHP short hash like URL-shortening websites
- Best practice: PHP Magic Methods __set and __get [duplicate]
- How to get current time in milliseconds in PHP?
- PHP conditionals, brackets needed?
- PHP Sort array by field? [duplicate]
- How can you make a multidimensional array unique? [duplicate]
- Resize images with PHP
- Are PHP5 objects passed by reference? [duplicate]
- Regex for names with special characters (Unicode)
- How to get exact browser name and version?
- Select last 20 order by ascending – PHP/MySQL
- Windows CMD.exe “The system cannot find the path specified.”
- mysqli – fetch_Array error call to a member function fetch_array() on a non-object mysqli [duplicate]
- Regular expression for a string that must contain minimum 14 characters, where at minimum 2 are numbers, and at minimum 6 are letters
- Conditional Statements in PHP code Between HTML Code
- change initial array inside the foreach loop?
- Registry design pattern…good or bad?
- PHP code for anti hotlinking