Here is an example of text taken from database and displayed on the page:
Lorem ipsum dolor sit amet,
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris etc....
What to do to make the text below to looks like
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
I'm trying to remove all unnecessary white spaces and new lines. I have tested with trim() end str_replace, but I did not get the result that I want.