Hi All,
I have got some text in a database which I am returning to be displayed.
As you will see in the code below I have tried three options, but none work.
I typed the text in to the database via the PHPMyAdmin tool.
while ($row = mysql_fetch_array($query, MYSQL_NUM))
{
print "<table>".NL;
print "<tr>".NL;
print "<td><h1 align=left class=headline>" . $row[2] . "</h1></td>".NL;
print "</tr>".NL;
print "<tr>".NL;
print "<td><p>" . str_replace('\n','<br />\n',$row
[3]) . "</p></td>".NL;
// I have tried . str_replace('\n','<br>',$row[3]) . "...etc
// also tried . str_replace('Chr(13)','<br>',$row[3]) . "...etc
print "</tr>".NL;
print "<tr>".NL;
print "<td>";
if (@file('pictures/'. $row[4] .'.jpg'))
{
print "<img src='pictures/" . $row[4] . ".jpg' border=0> ";
}
if (@file('pictures/'. $row[5] .'.jpg'))
{
print "<img src='pictures/" . $row[5] . ".jpg' border=0> ";
}
if (@file('pictures/'. $row[6] .'.jpg'))
{
print "<img src='pictures/" . $row[6] . ".jpg' border=0>";
}
print "</td></tr>".NL;
print "</table>".NL;
}
Any offers.......
Cheers,
Neil.