Jump to content

Retaining Paragraphs in Displayed Data


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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.