ID newlines

  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 09, 2008
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England
  • Status: Offline

Post June 10th, 2009, 12:37 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 10th, 2009, 12:37 am

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post June 10th, 2009, 12:41 am

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

http://us.php.net/nl2br
#define NULL (::rand() % 2)
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post June 10th, 2009, 12:50 am

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. :)
Strong with this one, the sudo is.
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 09, 2008
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England
  • Status: Offline

Post June 10th, 2009, 12:56 am

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 116 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.