Jump to content

Retaining Paragraphs in Displayed Data


Go to solution Solved by dave1950,

Recommended Posts

I am a newbie to mysql and php and have inherited a mysql database with documents that appear to contain paragraph formatting based on viewing the actual data in the “SectionText” table while in phpMyAdmin.  The table uses “longtext” type data format.

 

When I display a document from the SectionText table on a web page, the paragraph formatting does not exist and it all runs together with no paragraphs.  To display the document content after searching the database, I use this code:

 

echo "<table border='1' width='600px'>

<tr class=\"style3\">

<th>Text</th>

";

while($row = mysql_fetch_array($result1))

{

echo "<tr class=\"style2\">";

echo "<td style=\"width: 600px;\">" . $row['SectionText'] . "</td>";

echo "</tr>";

}

echo "</table>";

 

I assume that I will want to modify the echo statement that displays the SectionText data, but have not been able to find anything on the web to help me get started in sorting this out.  Any help would be greatly appreciated. - Dave

Link to comment
https://forums.phpfreaks.com/topic/287743-retaining-paragraphs-in-displayed-data/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.