To remove white spaces from the beginning and end of a string, you would use the ________ function in PHP.

  • trim()
  • remove_spaces()
  • strip_whitespaces()
  • clean_string()
The trim() function in PHP is used to remove white spaces from both the beginning and the end of a given string, making it useful for data cleaning.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *