Jump to content


php - preserve line break structure


1 reply to this topic

#1 greggreg

    Young Padawan

  • Members
  • Pip
  • 14 posts

Posted 19 November 2005 - 04:48 AM

hey,

im trying to figure out a good system for displaying a body of text retrieved from mysql that a user has posted. the two main aspects it concerns are:

1) a hazardous code stripper/replacer along withthe ability to use bb code

2) line break structure preservation. for example if i put three line breaks when i write this



it displays 3 line breaks when it is posted.

for the most part i have thoe bbcode and hazardous code stripper/replacer, but am always open to a good link or read about it. what i cant seem to find is anyway of preserving the line break structure without using the <pre> tags. any help would be awesome. thanks.

#2 greggreg

    Young Padawan

  • Members
  • Pip
  • 14 posts

Posted 19 November 2005 - 05:01 AM

why greggreg you idiot its nl2br();


im retarded / found it shortly after posting





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users