So the function nl2br is handy. Except in my web app, I want to do the opposite, interpret line breaks as new lines, since they will be echoed into a pre-filled form.
An alternative to @PascalMARTIN 's answer:
$string = str_replace(array( '', '', '', ), "\n", $string);
It does not work with multiple white-spaces like but this should be a really rare case.