Jump to content


Photo

Line breaks


  • Please log in to reply
3 replies to this topic

#1 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 10 July 2006 - 09:05 PM

Hi guys,
In MYSQL Is it possible toautomatically detect line breaks instea dof using "<br>" example:

i want to write:
Hey dude, <br>
Please can You help me.

And instead of having to place <br> it automatically realises it.

#2 ShogunWarrior

ShogunWarrior
  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 10 July 2006 - 09:08 PM

Do you mean adding <br /> when outputting to a browser?
<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd

#3 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 10 July 2006 - 09:14 PM

yeah, basically replacing a line break with <br> when outputting...

#4 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 10 July 2006 - 09:15 PM

use the function nl2br() on the text from your database.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users