SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2002
    Location
    UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Retaining paragraph breaks in text area?

    Hi,

    I'm currently using DreamweaverMX to create a simple CMS for my site using PHP and MySQL, and I've run into a small problem.

    I need the text area to retain the paragraph breaks automatically without my need to insert the <BR> tags manually.

    Can anyone suggest a simple solution to this problem?

    Regards

    Psmeg

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will almost certainly find the PHP function nl2br() helpful here [img]images/smilies/smile.gif[/img]

    Hope this helps!

    -Sam
    Sam Hastings

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2002
    Location
    UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers Devilware,

    Thanks for pointing me in the right direction. A little nose at my PHP/MySql book and a little experimentation later and it's working sweet as a nut.

    You're a life saver....

    Regards

    Psmeg


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •