On 03/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> To get to a standard (\n) from all formats -
> $mystring = str_replace("\r", "\n", $my_string);
> to remove all double line feeds -
> while(strpos($my_string, "\n\n") != FALSE)
> {
> $my_srting = str_replace("\n\n", "\n", $my_string);
> }
>
You could also use one line of preg_replace...
$my_string = preg_replace("/\n{2,}/", "\n", $my_string);
