PHP Code -Remove White Space ONLY, Leave Line Breaks Intact

PHP Function Code to Remove ALL White Space from String Such as Tabs and Multiple Spaces but Leave the Carriage Returns and Line Breaks Alone

Home Short:

The following PHP code function will remove all whitespaces from a string which include tabs and multiple spaces but leave the line breaks and carriage returns alone NOT removing carriage returns and line breaks.

S
H
A
R
E