Home > Backend Development > PHP Tutorial > PHP uses the trim function to remove left and right spaces and special characters from a string.

PHP uses the trim function to remove left and right spaces and special characters from a string.

WBOY
Release: 2016-07-29 09:07:16
Original
1296 people have browsed it

The example in this article describes how PHP uses the trim function to remove left and right spaces and special characters from a string. Share it with everyone for your reference, the details are as follows:

The trim() function in PHP is defined as follows:

trim(string,charlist)

The parameter description is as follows:

string required. Specifies the string to check.

charlist

Optional. Specifies which characters are removed from the string. If omitted, all following characters are removed:
"
The above introduces examples of PHP using the trim function to remove left and right spaces and special characters from a string, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template