Posts

Showing posts from February, 2022

PHP tips - Decoding html entities from database

PHP tips - Decoding HTML Sometimes a particular situation in system development may require that, a web developer saves HTML elements wrapped around data in the database row. Hence retrieving such data into the web page may appear encoded, with an HTML element. With the help of PHP  built-in functions like html_entity_decode(); we can successfully, retrieve the data wrapped with HTML tags, and have it well displayed to the user. Applying double quote (" ") Html tags that happen to require quotation marks, must be made double instead of single quotes (''). For example, HTML attributes require their values or properties to be in quotes, when these tags find themselves in a database, do well to make them double quotes, as this will prevent errors when decoding the data into the HTML page.

followers