Basically i have all the code to pull out an 'article' and the coressponding picture from my database. However my problem is more cosmetic, instead of just displaying the picture and the text uniformly i would like to alternate the side where the image appears. So the first record will display the image on the left the second on the right and so on. Below is the code i am using to pull out all the records:
$sql = "SELECT *
FROM people, photos
WHERE people.site_section = 'Graduates'
AND people.status = 'LVE'
AND photos.section = 'people'
AND photos.photo_group = people.fullname";
$result = mysql_query($sql, $conn)or die(mysql_error());
$display_block = "";
$count=0;
while ($row = mysql_fetch_array($result)) {
//give a name to the fields
$fullname = $row['fullname'];
$biog = $row['biog'];
$position=$row['position'];
$photo=$row['photo'];
$title = $row['title'];
$caption = $row['caption'];
$filename=$row['filename'];
$display_block .= "<table width=\"450\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" class=\"content\"><tr><td><img src=\"photo_uploads/$filename\" width=\"140\" height=\"220\" border=\"0\" alt=\"$caption\"align=\"left\">$fullname<br>$biog</td></tr></table>";
}
Does anyone know a simple way in which this can be done. Many Thanks