Как извлечь только текст из строки HTML с помощью PHP?Php

Кемеровские программисты php общаются здесь
Anonymous
Как извлечь только текст из строки HTML с помощью PHP?

Сообщение Anonymous »

Я хочу извлечь только текст из строки php.

Эта строка php содержит HTML-код, такой как теги и т. д.

Поэтому мне нужен только простой текст из этой строки.

Это настоящая строка:

Код: Выделить всё

[b]The celebration of the Recon class in our second [/b][url=http://blogs.battlefield.com/2014/10/bf4-class-week-recon/]BF4 Class Week[/url][b] continues with a sneaky stroll down memory lane. Learn more about how the Recon has changed in appearance, name and weaponry over the years…[/b]

 

[url=http://eaassets-a.akamaihd.net/battlelog/prod/954660ddbe53df808c23a0ba948e7971/en_US/blog/wp-content/uploads/2014/10/bf4-history-of-recon-1.jpg?v=1412871863.37]
[img]http://eaassets-a.akamaihd.net/battlelog/prod/954660ddbe53df808c23a0ba948e7971/en_US/blog/wp-content/uploads/2014/10/bf4-history-of-recon-1.jpg?v=1412871863.37[/img]
[/url]
Я хочу показать это из строки:

Код: Выделить всё

The celebration of the Recon class in our second BF4 Class Week continues with a sneaky stroll down memory lane. Learn more about how the Recon has changed in appearance, name and weaponry over the years…
На самом деле этот текст будет помещен в метатег описания, поэтому мне не нужен HTML в метатеге.
Как я могу это сделать? Есть идеи и мысли по поводу этой техники?

Подробнее здесь: https://stackoverflow.com/questions/263 ... g-with-php

Вернуться в «Php»