How to remove html tags in php: Delete html tags by using the strip_tags() function, such as [strip_tags (string to be filtered);].
The operating environment of this article: windows10 system, php 7, thinkpad t480 computer.
We may encounter this situation when we are working. We need to filter a string, but this string also contains html tags. So how should we deal with this situation?
In fact, PHP provides us with a function strip_tags(). By using this function, we can easily filter strings with html tag codes.
<?php $str = '你好,我是<br/>某某某'; echo strip_tags($str); ?>
Input result: Hello, I am so-and-so
Comment: As can be seen from the above code, the strip_tags() function removes the "
Recommended learning: php training
The above is the detailed content of How to remove html tags in php. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
