I have text data like this:
Learn More
Hide [x]
Colors
Fetching Colors description...
Show more topics
Art exhibitions
Fetching Art exhibitions description...
Abstract art
Fetching Abstract art description...
Representational art
Fetching Representational art description...
I'd like to be able to remove all the carriage returns, so it becomes like this:
Learn More Hide [x] Colors Fetching Colors description... Show more topics
How do I do this in PHP? Note that the strings might be UTF-8 string, and we need to take into account various kinds of tab, carriage return and white space characters. (I am thinking along the lines of a tokeniser algorithm used in a compiler, where multiple carriage return and white space characters are taken care of.)