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