RE: [PHP] formatting paragraphs in to strings

From: Date: Mon, 13 Jun 2005 20:25:39 +0000
Subject: RE: [PHP] formatting paragraphs in to strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-216909@lists.php.net to get a copy of this message
> Good point. Only problem is, if someone hit enter a-million times, > you would end up with a-million spaces where the "\n" characters were. > To take care of that repetition, maybe something like: > > > while (strpos($textarea_text, "\n\n")) { > ..... > } > > > would be one way you could do it. Ordinarily most browsers render multiple consecutive spaces as a single space. This doesn't mean that it's not a good idea to remove them, just that not doing so shouldn't effect the way the text is displayed in the div tag, as the original poster mentioned was his intention. Regards, Murray

« previous php.general (#216909) next »