Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    Hong Kong
    Posts
    13

    Unanswered: PHP/MySQL - Please HELP!!

    Hello Everyone,

    I am trying to build a dynamic page with contents from database. I am using PHP/MySQL and DW as my editor. I have a field type "LONGTEXT" for my long contents, containing 3 to 4 paragraphs of over 100 words. I noticed that the display of these contents is no longer in paragraph format (as originally created in the table) but a one long text wrapping around one column. How can I translate into a whole body text with paragraph breaks those records I have in my database? Please help.

    Thanks a lot.
    Felix
    Last edited by fdelix; 12-29-04 at 03:08.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    It's always going to look like one long text string when viewed raw in the database. Newline and paragraph characters are interpreted by the browser.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2004
    Posts
    5
    I'm guessing you dumped all the data to an html page and need it to stay in paragraph form.

    You could do a str_replace for \n and replace it with <br> after pulling the content from the database, or you could do this before you put it in.

  4. #4
    Join Date
    Oct 2003
    Location
    Hong Kong
    Posts
    13
    Dear Wahrheit/Teddy,

    Ted, the page I was viewing was not raw, its the actual html page in one long text warapping around.

    Wahrheit - yes i'm dumping the data in one page. Now the problem is to execute your suggestion. I'm just a starter and "str_replace.." is something new to me. Please elaborate.

    Thanks Ted/Wahrheit.

  5. #5
    Join Date
    Oct 2003
    Location
    Hong Kong
    Posts
    13
    Hi guys,

    Problem solved.. thanks for the tips.

    Felix

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •