Q. What does the PHP function trim() do?

  • (A) Removes whitespace from the beginning and end of a string
  • (B) Removes all spaces inside a string
  • (C) Removes tabs only
  • (D) Removes newline characters only
πŸ’¬ Discuss
βœ… Correct Answer: (A) Removes whitespace from the beginning and end of a string
Explanation: trim() removes whitespace or other predefined characters from both ends of a string.
Explanation by: Rati Dubey
trim() removes whitespace or other predefined characters from both ends of a string.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
77
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
90%
Success Rate