Alright, I'll bite. Here's how I would do it.
Okay, first I'd create an array
$results=mysql_query ("SELECT * FROM table ORDER BY field");
then I'd create a loop here, then define field variables
while ($row=mysql_fetch_array($results)){
$headline = $row["headline"];
$news = $row["news"];
$time = $row["time"];
then I'd define the display formats options,
this is done within the loop statement
if.. is used for control
if($image=="")
{
$display_news .="
<p><b>$headline</b>
<br>$time
<br>$news</p>";
}
else
{
$display_news .="
<p>$image<br>
<br><b>$headline
<br>$time
<br>$news</p>";
}
;
}
?>
<? echo "$display_news"; ?>
Closing the first php query, then calling the results with a second <? php will allow the results to be formatted for each iteration, or each record. So if record a has an image, then the esle statement is used, if record b doesn't have an image then the if statement is used.
You'll have to add the extra formatting. I tend to minimalize html code in the <?php statements, so that script is more portal. This script can then be used as an include file in a larger html document, and will use style sheets and formating from that document.
In the html document I would just use the statement
<? include "displaynews.php3"; ?>
Where evr I want the file to display.
Alnisa