Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Remove White Space At Sides

$x = "  abc  ";
print(trim($x));

There are three versions of trim().
trim(): trims white space on both ends
rtrim(): trims white space on the right end
ltrim(): trims white space on the left end

Note that trim() does not remove white space in the middle of the string.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Remove #White #Space #At #Sides
ADD COMMENT
Topic
Name
7+5 =