S
S
Schoolboy.2015-09-29 18:38:29
PHP
Schoolboy., 2015-09-29 18:38:29

How to remove html code in php?

It is necessary that the php script changes some characters, for example: < to &lt;> to &gt;So that the user cannot use html, javascript, etc.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivanq, 2015-09-29
@viphorizon

Use the htmlspecialchars function

L
Lesha Kiselev, 2015-09-29
@Yakud

htmlspecialchars :
php.net/manual/en/function.htmlspecialchars.php

A
Alexey, 2015-09-29
@dzheka3d

Why would you keep them... remove strip_tags()

A
Andrew, 2015-09-29
@Menlod

php.net/manual/ru/function.htmlentities.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question