Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does php remove the native function of html tags

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "php how to remove the native function of html tag". In daily operation, I believe that many people have doubts about how php removes the native function of html tag. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the question of "how to remove the native function of html tag by php". Next, please follow the editor to study!

Strip_tags removes the marks of HTML and PHP. Syntax: string strip_tags (string str); return value: string function type: data processing content description this function can remove any HTML and PHP tag strings contained in the string. If there are errors in the HTML and PHP tags of the string, for example, if the symbol greater than is missing, an error will also be returned.

Strip_tags

Remove the HTML and PHP marks.

Syntax: string strip_tags (string str)

Return value: string

Type of function: data processing

Content description

This function removes any HTML and PHP tag strings contained in the string. If there is an error in the HTML and PHP tags of the string, for example, if the symbol greater than is missing, an error will also be returned. This function has the same function as fgetss ().

Htmlspecialchars

Converts special characters to HTML format.

Syntax: string htmlspecialchars (string string)

Return value: string

Type of function: data processing

This function converts special characters to the string format of HTML (&.;). The most commonly used occasion is probably the message version for dealing with customer messages.

& (and) turn into &

"(double quotation marks) converted to"

< (小于) 转成 <   >

(greater than) convert to >

This function only converts the special characters above, and not all of them are converted to the ASCII transformation specified by HTML.

Use example

The copy code is as follows:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report