ID newlines

  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

HI I was working on my site with a prg_replace command to replace the likes of [ b ] [ /b ] with class or something and its ok but I was trying to work out how to change a line break return what ever you call it with a <br /> tag.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

PHP has a really cool function to take care of this.

http://us.php.net/nl2br
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Don't forget, you can wrap the text in a <pre/> element which will interpret the linebreaks instead of ignoring them or forcing you to convert them into <br/> elements. :)
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

joebert wrote:
Don't forget, you can wrap the text in a <pre/> element which will interpret the linebreaks instead of ignoring them or forcing you to convert them into <br/> elements. :)
I tried that but the pre lets it flow out of my div.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 115 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.