In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what trim means in php, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Php's trim is a built-in function to remove white space characters or other characters at the beginning and end of a string. It is generally used on the server to process the received user data so as to avoid storing the spaces mistakenly entered by the user to the database.
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
The function and usage of PHP trim () function
The PHP trim () function is generally used to remove white space characters (or other characters) at the beginning and end of a string. It is generally used on the server to process the received user data, so as to avoid storing the spaces mistakenly entered by the user to the database, and make an error next time when comparing the data.
The function takes two arguments, and the second can be empty in the following format:
Trim (string $str [, string $character_mask = "\ t\ n\ r\ 0\ x0B"])
$str is the string to be processed. If $character_mask is not empty, only the clear characters written on $character_mask will be clear. If the second parameter, $character_mask, is empty, the following characters will be filtered:
"(ASCII 32 (0x20)), a normal space character.
"\ t" (ASCII 9 (0x09)), tabs.
"\ n" (ASCII 10 (0x0A)), newline character.
"\ r" (ASCII 13 (0x0D)), carriage return.
"\ 0" (ASCII 0 (0x00)), empty byte character.
"\ x0B" (ASCII 11 (0x0B)), vertical tab.
After the data is processed, the filtered string is returned.
Set a parameter $str:
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.