0 голосов
 
623 просмотра
25.04.2019 / 16:37  Arey

Remove html tags.

How can I remove html tags by Php. E.g.:
$text='<b>bold</b>';

Now, I need get 'bold'.
How I can remove <b> and </b>.

(Remove From '<' to '>')
Изм. Arey от 25.04.2019 / 16:50
Ответы
 
2 голоса
 
# 26.04.2019 / 09:04  Koenig
strip_tags же
https://www.php.net/manual/ru/function.strip-tags.php
Изм. Koenig от 26.04.2019 / 09:05
 
0 голосов
 
# 25.04.2019 / 16:43  GreeNLine
preg_replace
---
regexp
/<|>/ui to null
27.04.2019 / 20:09  Пользователь удалён
You should void using regular expressions with HTML
Всего: 2

Реклама

Мы в соцсетях

tw tg yt gt