Some usage of the PHPtrim () function and the phptrim function. Some usage of the PHPtrim () function and the phptrim function use stringtrim (string $ str [, string $ charlist])-removes spaces (or other characters) at the beginning and end of the string trim () PHP trim () functions and phptrim functions
StringTrim(String$ Str[, String$ Charlist])-Removes spaces (or other characters) at the beginning and end of the string)
When the second parameter of the trim () function is null, spaces, tabs, line breaks, carriage returns, and Vertical tabs are removed by default. when the second parameter is added
1) trim ('\ "string \"', '\ "sg'); // final output: \" strin
2) trim ('\ "string \"', '\ "sg'); // final output: \" string \"
2) trim ('\ "string \"', '\ "sg'); // The final output is trin.
Therefore, the trim () function preferentially removes the spaces at the beginning and end of a character, and then filters out the given characters (lists) to be removed. This function is also applicable to the ltrim () and rtrim () functions.
Some usage of the http://www.bkjia.com/PHPjc/983852.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/983852.htmlTechArticlePHP trim () function, phptrim function usage string trim (string $ str [, string $ charlist])-removes spaces (or other characters) at the beginning and end of a string) trim () function...