Home >Backend Development >PHP Problem >How to remove format in php

How to remove format in php

藏色散人
藏色散人Original
2020-08-25 11:33:482509browse

In PHP, format removal can be achieved through the "strip_tags" function. The syntax is "strip_tags(string,allow)". This function always strips HTML comments and cannot be changed through the allow parameter.

How to remove format in php

Recommendation: "PHP Video Tutorial"

PHP Removes HTML Format and Style

strip_tags() function strips HTML, XML and PHP tags from strings.

Comments: This function always strips HTML comments. This cannot be changed via the allow parameter.

Note: This function is binary safe.

Syntax

strip_tags(string,allow)

Parameters

string Required. Specifies the string to check.

allow Optional. Specifies allowed tags. These tags will not be deleted.

Technical details

Return value: Returns the stripped string.

The above is the detailed content of How to remove format in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn