PHP implementation of closed HTML tags, PHP complement HTML tags
The example in this article describes the HTML tags that PHP implements to close. Share to everyone for your reference, as follows:
Most of the time, when we make a fuss about
PHP implements completion of closed HTML tags, and php supplements html tags. PHP implements completion of closed HTML tags. php supplements html tags. this example describes how PHP implements completion of closed HTML tags. For your reference, we
PHP features: the command line mode starts with version 4.3.0. PHP provides a new type of cli sapi (Server Application Programming Interface, Server Application Programming Port) support, named CLI, command Line Interface, that is, Command Line
PHP strip_tags () goes to the function of HTML, XML, and PHP tags in the string, Strip_tagsxml
Strip_tags Definition and usage
The Strip_tags () function strips the HTML, XML, and PHP tags from the string.
Note: This function always strips HTML
In php, the most common HTML tag can be replaced by the strip_tags function, which can be used to filter all html tags, next I will introduce other methods besides this function.
Sometimes we need to store html tabs in the database, but in some
PHP implements completion of closed HTML tags, and php supplements html tags
The example in this article describes how to complete and disable HTML tags in PHP. We will share this with you for your reference. The details are as follows:
Most of the
Starting with version 4.3.0, PHP provides a new type of CLI SAPI (Server application Programming Interface, service-side application programming port) support, called CLI, which means Command line Interface , which is the command-line interface. As
Sometimes we need to store html tabs in the database, but in some cases we need to take pure data without html tags. At this time, we need to process the data with html tags, remove all html tags. Htmlspecialchars () is usually used to filter html,
First, let's look at your own writing method. The code is as follows:Copy code Str_replace ("", '', str_replace (' ','', str_replace ('', '', $ vv )))The simplest method is to replace the two divs specified in the $ vv variable. Later, we found
Instance
Peel the HTML tags from the string:
world!");? >
Definition and usage
The Strip_tags () function strips the HTML, XML, and PHP tags from the string.
Note: This function always strips HTML comments. This cannot be changed by the Allow
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.