$var = preg_replace("/[\r\n]+/","\n",$var);
"Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> neither worked.  any other suggestions?
>
>
> "Bb" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > replace that with
> > $var = preg_replace("/\n+/","\n",$var);
> >
> > "Bb" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > $var = preg_replace("/\n*/","\n",$var);
> > > "Jason Caldwell" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Is there an elegant way to remove excess blank lines from my form
> data?
> > > >
> > > > For example;  if someone enters the following text and then press'
the
> > > > Submit button:
> > > >
> > > >     ----
> > > >     This is a some text
> > > >
> > > >
> > > >     This is more text, and yet even more....
> > > >     ----
> > > >
> > > > What I want to do is remove the excess white space and make it look
> like
> > > > this?
> > > >
> > > >     ----
> > > >     This is a some text
> > > >
> > > >     This is more text, and yet even more....
> > > >     ----
> > > >
> > > > My users may press <enter> too many times and I want to ensure clean
> > text
> > > > and formatting.
> > > >
> > > > Thanks.
> > > > Jason
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to