Re: [PHP] Extra spacing with br in HTML

2002-07-28 Thread Justin French
I *think* you've got a typo -- you've said ln2br instead of nl2br i think. Aaaannny way, you can't modify WHAT php does in nl2br, but you can do something to the resulting code, like replacing /libr / with /li: ? $original = ulliBlar/li/ul; $new = nl2br($original); $new = str_replace('/libr /',

Re: [PHP] Extra spacing with br in HTML

2002-07-28 Thread Justin French
on 28/07/02 12:53 PM, Jason Stechschulte ([EMAIL PROTECTED]) wrote: There might be an easier way, but you might just have to write your own code for this. Something along the lines of: (completely untested) ?php $line = ereg_replace((^li|^ul|^ol)\n, br /\n, $line); ? Definately an

Re: [PHP] Extra spacing with br in HTML

2002-07-28 Thread Kevin Breit
On Sun, 2002-07-28 at 04:04, Justin French wrote: I *think* you've got a typo -- you've said ln2br instead of nl2br i think. Doh! You got that right. Aaaannny way, you can't modify WHAT php does in nl2br, but you can do something to the resulting code, like replacing /libr / with /li: ?

Re: [PHP] Extra spacing with br in HTML

2002-07-28 Thread Justin French
on 29/07/02 12:02 AM, Kevin Breit ([EMAIL PROTECTED]) wrote: Aaaannny way, you can't modify WHAT php does in nl2br, but you can do something to the resulting code, like replacing /libr / with /li: ? $original = ulliBlar/li/ul; $new = nl2br($original); $new = str_replace('/libr /', '/li',

Re: [PHP] Extra spacing with br in HTML

2002-07-28 Thread Kevin Breit
On Sun, 2002-07-28 at 10:14, Justin French wrote: on 29/07/02 12:02 AM, Kevin Breit ([EMAIL PROTECTED]) wrote: Aaaannny way, you can't modify WHAT php does in nl2br, but you can do something to the resulting code, like replacing /libr / with /li: ? $original = ulliBlar/li/ul; $new

[PHP] Extra spacing with br in HTML

2002-07-27 Thread Kevin Breit
Hey guys, 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 liBlar/li /ul ln2br() will crunch that and put

Re: [PHP] Extra spacing with br in HTML

2002-07-27 Thread Jason Stechschulte
On Sat, Jul 27, 2002 at 08:08:34PM -0400, Kevin Breit wrote: Lets say I have ul liBlar/li /ul ln2br() will crunch that and put out: ulbr / liBlar/libr / /ulbr / That creates a lot of white space when that HTML is rendered. How do I tell PHP not to put line breaks in a