In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "how to remove the leftmost space in php", the content is simple and easy to understand, and the organization is clear. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn "how to remove the leftmost space in php".
In php, you can remove the leftmost space by using the ltrim function, which uses the syntax "ltrim(string,charlist)", and the parameter string specifies the string to be checked.
Operating environment: Windows 7 system, PHP7.1, Dell G3 computer.
In php, you can remove the leftmost space by using the ltrim function.
The ltrim() function removes white space or other predefined characters from the left side of a string.
Correlation function:
rtrim() -removes white space or other predefined characters from the right side of the string
trim() -removes white space or other predefined characters from both sides of a string
syntax
ltrim(string,charlist)
parameters
string Required. Specify the string to check.
Charlist is optional. Specifies which characters to remove from a string. If this parameter is omitted, all of the following characters are removed:
"\0" - NULL
"\t" -tab character
"\n" -newline
"\x0B" -Vertical tab
"\r" -Enter
" " -Space
Remove spaces to the left of string:
HTML output of the above code (see source code):
Without ltrim: Hello World!
Use ltrim: Hello World!
Browser output of the above code:
No ltrim: Hello World! Use ltrim: Hello World!
The above is "php how to remove the leftmost space" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
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.