---
title: "Discussion on \"Remove defined HTML tags including content from a string with PHP\" | Hashnode"
description: "Discussion on \"Remove defined HTML tags including content from a string with PHP\". Recently, a friend asked me to send a script to remove pre tags from a string, including content. He uses a script to calculate the reading time for the content, but doesn't want the pre-tags to be included in the scoring. So if you ever have a simil..."
url: "https://hashnode.com/posts/remove-defined-html-tags-including-content-from-a-string-with-php/632c94ba318ff0fa18337c8f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Remove defined HTML tags including content from a string with PHP](https://en.pixelbart.de/remove-defined-html-tags-including-content-from-a-string-with-php?utm_source=hashnode&utm_medium=feed)

Recently, a friend asked me to send a script to remove pre tags from a string, including content. He uses a script to calculate the reading time for the content, but doesn't want the pre-tags to be included in the scoring. So if you ever have a simil...

Sep 22, 2022 · 2 min read · en.pixelbart.de  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#regex](https://hashnode.com/tag/regex)
-   [#html](https://hashnode.com/tag/html)

## Written by

[Kevin Pliester](https://hashnode.com/@pixelbart)

@pixelbart · Germany

  
[View profile](https://hashnode.com/@pixelbart)

Webdev

Speaks many languages, but currently only uses PHP, JavaScript and WordPress (I consider it its own language, since it's a big sandbox).

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
