This article mainly introduces PHP using Strip_tags () to remove HTML tags still have a blank solution, involving PHP regular replacement of the relevant operating skills, the need for friends can refer to. We hope to help you.
Specific as follows:
PHP has a built-in Php_strip_whitespace method for reading php files and removing whitespace and comments from the code, but does not support direct read content removal of whitespace and annotations, and the following method supports reading string
In this video, I'll show you the varous ways of adding comments to PHP scripts.
Below are several comments:
HTML: ;
CSS :/**/;
JS ://,/**/;
PHP :#,//,/**/;
I'll also explain PHP's attitude to whitespace. the most obvious reason for adding
PHP How to clear the HTML format and remove the space in the text and then intercept the text, a detailed share of the processing method (by the way PHP clears the HTML string function to do a summary):Htmlspecialchars Turning special characters
What is Q:string.prototype.trim for?A: Add a trim method to the string object.1 DOCTYPE HTML>2 HTMLLang= "en">3 Head>4 MetaCharSet= "UTF-8">5 title>title>6 styletype= "Text/css">7 . Text_page{Line-height:28px;}8 style>9 Ten Head> One
Whitespace folding is premised on the premise that the HTML standard document flow is positioned and floated out of the document stream and there will be no white space collapsed relative positioning is not out of standard document flowThe first
Instance
Remove the characters to the left of the string:
"; Echo LTrim ($str, "Hello"); >
Definition and usage
The LTrim () function removes white space characters or other predefined characters to the left of the string.
Related functions:
RTrim ()
When the test block-level element differs from the in-line element, it is found that there should be no interval between the horizontal elements in the row within the line element.1 span>In-line elementsspan>2 span>In-line elementsspan>3
There is a lot of discussion about using inline-block instead of float, most often by using inline-block instead of float for layout, or using Inline-block to achieve the center effect of the element. The previous "CSS3-made pager" article is the
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.