Jump to content

Text display issues... pls help


Sorrow

Recommended Posts

Here is my problem. The website i am currently building is a movie reviews website. In the reviews and in the news and we need to write some text that is saved to the database. This is working fine and even in the database there is the carriage return but when i am displaying the text all the text is in one paragraph how can I keep the carriage return when I fetch the data from the database.

 

Here is my code :

 

<?php

include 'opendb.php';

$query  = "SELECT * FROM News ORDER BY newsid DESC";
$result = mysql_query($query);

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
    echo "<font face = 'Verdana'><table width='450' border = '0'>

<tr>
  <td colspan ='2'><b>{$row['newsTitle']} </td>
  <td>{$row['Date']}</td>
</tr>
<tr>
  <td colspan = '2'>--------------------------------------------------------------------------------------------</td>
</tr>
<tr><td rowspan = '3'><img src='{$row['MoviePic']}'width='200' height='250' >
<br>Director : {$row['Director']}
<br>
<br>Actors : {$row['Actors']} </td></tr>
<td width ='300' colspan='2' align='justify'>{$row['News1']}</td>
<tr><td><img src='{$row['Pic1']}'width='200' height='200' >
<img src='{$row['Pic2']}'width='200' height='200' ></td></tr>

<tr><td><td width ='300' colspan='2' align='justify'>{$row['News2']}</td></tr>
</td>
</tr>
</table></font>


";
}
mysql_close($con);

?>

Link to comment
https://forums.phpfreaks.com/topic/121787-text-display-issues-pls-help/
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.