Software : PHP Tutorial : PHP Trim ... Using the trim function in PHP ... SYNTAX: $TrimmedString = trim($StringToBeTrimmed); /* Trim string */ RESULT: Removes leading and tailing white spaces from a string. Return to the tutorials page.