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

Display a text from a database with paragraphs

Explorer ,
May 05, 2006 May 05, 2006
Hi
I’ve just developed a php page that gets texts from a mysql database and displays them on the site, but my problem is that it doesn’t show the paragraphs I make.
The texts are uploaded to the database with a dreameaver form.

Can anyone help me?
TOPICS
Server side applications
250
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 ,
May 05, 2006 May 05, 2006
LATEST
> Can anyone help me?

Paragraphs are HTML tags. You need to store the text in the DB as HTML.

Of course, to do that, you need to create HTML to put into the database.

The typical way is to use a 'textarea WYSIWYG editor replacement' like
Xstandard or TinyMCE.

This allows you to make HTML that can be saved in the DB.

Otherwise, if the ONLY html you need is P tags, you could take the text out
of the DB and manually go through the text replacing each double line-return
with </p><p> and then dumping the whole thing in between a set pf <p></p>
tags.

-Darrel


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