Why
is not stripped in strip_tags()
? Other than str_replace()
any other possibilities?
Why to use PHP? PHP can actually do anything related to server-side scripting or more popularly known as the backend of a website. For example, PHP can receive data from forms, generate dynamic page content, can work with databases, create sessions, send and receive cookies, send emails etc.
It is an open-source language. It is an easy-to-learn language, so PHP is the language of choice if you have less time on your hands. It is highly compatible, as it works with multiple programming languages such as HTML, Javascript and supports various database languages like MySQL, PostgreSQL, Oracle, and so on.
Well, it's not a tag :)
Also, yeah, html_entity_decode
is the way to go.
Unlike HTML tags, entities (such as <
or
) represent actual characters.
If you strip all entities from a piece of HTML, you'll ned up stripping all <
characters, as well as any other characters that were included as entities.
You need to decode the entities into the characters that they represent, using the html_entity_decode
function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With