Line breaks not working

Discussion in 'HTML & Website Design' started by Glen, Jun 3, 2008.

  1. #1
    Glen, Jun 3, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    If you're using PHP you can use the nl2br function: http://us3.php.net/nl2br
    It adds a <br /> tag before every newline.
     
    itcn, Jun 3, 2008 IP
  3. Glen

    Glen Peon

    Messages:
    1,852
    Likes Received:
    91
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Wouldn't that mess up my usual blog entries?

    I'm using 'brians threaded comments' so I know that is messing things up just not sure how to fix it...
     
    Glen, Jun 3, 2008 IP
  4. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #4
    You don't have to use the function around everything on your blog, just edit the PHP code which displays the comments and use the nl2br function.
     
    itcn, Jun 3, 2008 IP