Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Dynamic Text Line Breaks

New Here ,
Jun 16, 2006 Jun 16, 2006
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?
TOPICS
Server side applications
369
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 17, 2006 Jun 17, 2006
LATEST
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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines