PHP string trim() functionPHP string trim() function is in-built function. It is used to strip whitespace from the beginning and end of a string or both side of a string. Syntax:
Example 1Output: Your string is: Hello PHP! By using trim() function :llo PHP Example 2Output: Without trim() function: Hello Javatpoint! With trim() function: Hello Javatpoint! Example 3Output: Without trim() function: Hello Javatpoint With trim() function:Hello Javatpoint
Next TopicPHP String
|