Skip to main content
June 17, 2006
Question

Dynamic Text Line Breaks

  • June 17, 2006
  • 1 reply
  • 387 views
I have a php page that displays records of a MySQL database. When I enter the text into the database I used "enter" for line breaks. But when the php page displays the record, it ignores the line breaks and puts all the words on one continious line. Can anyone help me get those line breaks to show up on my page?
This topic has been closed for replies.

1 reply

Inspiring
June 17, 2006
bcmpro wrote:
> I have a php page that displays records of a MySQL database. When I enter the
> text into the database I used "enter" for line breaks. But when the php page
> displays the record, it ignores the line breaks and puts all the words on one
> continious line. Can anyone help me get those line breaks to show up on my
> page?

nl2br()

http://www.php.net/manual/en/function.nl2br.php

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/