php ltrim () function syntax
ltrim () function how to use?
php ltrim () function is used to delete left a string of spaces or other predefined character, the syntax is ltrim (string, charlist), returns the string through charlist rule processing marble member
Role: delete left a string of spaces or other predefined character
Syntax: LTRIM (String, charlist)
parameter:
parameter | description |
string | Strings need to be addressed |
charlist | Optionally, the provisions of which characters from the string deleted if it is empty, then remove all of the following characters "\ 0" - NULL, "\ t" - tab, "\ n" - newline " \ x0B "- vertical tab" \ R & lt "- Enter" "- space |
Description: Returns the string through the rule processing charlist
php ltrim () function examples
? <PHP $ i = "the Hello world"; echo "not treated" $ i "on the left there is a space!";.. $ J = LTRIM ($ i); . echo "treated" $ j. "There are no spaces left!"; ?>