I just spent 1.5hrs on this. Damn.
To condense all groups of white space (newlines, carriage returns, tabs, form feeds, and spaces) into a single space, the following line should work...
$condensed=ereg_replace("[\n|\r|\t|\f| ]+", " ", $long_string);
Is that what you were after? I don't know if this is in the fsckin manual ;) but something similar is in Professional PHP Programming (Wrox impress) pg 189/190. Hope you've already solved this. Post your outcome?