Re: Extra spacing with <br> in HTML

From: Date: Mon, 29 Jul 2002 09:29:12 +0000
Subject: Re: Extra spacing with <br> in HTML
Groups: php.general 
Request: Send a blank email to php-general+get-110134@lists.php.net to get a copy of this message
> I am using a textarea to pass information to PHP. I want to be able to >include HTML tags inside the text area. I am using ln2br() to properly >convert line breaks to HTML. This is where my issue comes up. > >Lets say I have > ><ul> > <li>Blar</li> ></ul> > >ln2br() will crunch that and put out: ><ul><br /> > <li>Blar</li><br /> ></ul><br /> > >That creates a lot of white space when that HTML is rendered. How do I >tell PHP not to put line breaks in a situation like that? You can't really have the user putting in HTML and then you adding in nl2br() as well... If you're gonna let them type in HTML, just have them put in any line-breaks and <P> tags they need. If they don't understand the BR or P tag, they won't be able to do any others either. :-) -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.

« previous php.general (#110134) next »