Re: Can't get rid of newlines

From: Date: Wed, 06 Dec 2000 17:59:01 +0000
Subject: Re: Can't get rid of newlines
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-28916@lists.php.net to get a copy of this message
Ok, if you converted all the "\n" to "<BR>" and then did a string replace looking for "\n" you won't find any cause you converted them to "<BR>". You could either do a string replace on "\n" or "\n\r" WITHOUT converting newlines to "<BR>" or just do a replace on "<BR>" after converting it. -Joe S. [------------------------------------------------] Joe Smargie <joes@th.net> Systems Administrator - Technology Horizons 1-413-253-7700 (888-762-2283) [------------------------------------------------] This message is intended to be confidential and may be legally privileged. It is intended solely for the addressee. Unless authorized, any disclosure, copying, distribution or action taken or omitted in reliance on this message is prohibited and may be unlawful. ----- Original Message ----- From: "Louis Aslett" <laslett@sixnet.net> To: "Martin A. Marques" <martin@math.unl.edu.ar> Cc: <php-general@lists.php.net>; <php-db@lists.php.net> Sent: Wednesday, December 06, 2000 6:42 AM Subject: Re: [PHP] Can't get rid of newlines > My appologies, that e-mail should have gone: > > I'm trying to a some data from a <textarea> form element to an mSQL > database. However, mSQL coughs shortly after the first newline. > > So, I did nl2br() to put all the newlines to <br>'s and then tried the > following: > > $description=str_replace("\n"," ",$description); > > to get rid of the newlines. BUT! this string replace did absolutely > nothing and the newlines are still in there! > > WHY? > > Thanks > > Louis > > > ----- Original Message ----- > From: Martin A. Marques <martin@math.unl.edu.ar> > To: Louis Aslett <laslett@sixnet.net> > Cc: <php-general@lists.php.net>; <php-db@lists.php.net> > Sent: Wednesday, December 06, 2000 2:19 PM > Subject: Re: [PHP] Can't get rid of newlines > > > > On Wed, 6 Dec 2000, Louis Aslett wrote: > > > > > I'm trying to a some data from a <textarea> form element to an mSQL > > > database. However, mSQL coughs shortly after the first newline. > > > > > > So, I did nl2br() to put all the newlines to <br>'s and then tried the > > > following: > > > > What have toy tried? > > > > How are the new lines inserted in the textarea? Typing, copy and paste > > from word? > > > > Saludos... ;-) > > > > > > "And I'm happy, because you make me feel good, about me." - Melvin Udall > > ----------------------------------------------------------------- > > Martín Marqués email: martin@math.unl.edu.ar > > Santa Fe - Argentina http://math.unl.edu.ar/~martin/ > > Administrador de sistemas en math.unl.edu.ar > > ----------------------------------------------------------------- > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#28916) next »