You stored images in a database? That is usually not suggested. Unless they are just small like icons.
Usually, you just store the names and locations as text and then put them on the page using IMAGE tags.
Anyways, if your images ARE in your database, this might work for you. (Basically your code with tweaks!)
[php]
while($row = mysql_fetch_array($sql))
{
echo “
”;
echo “<td class=“collection” align=center>”;
echo “![]()
” . $row[morph] . “
” . $row[species] . “”;
if(next($row[id]))
{
echo “<td class=“collection” align=center>”;
echo “![]()
” . $row[morph] . “
” . $row[species] . “”;
echo “
”;
} else {
echo “
| ”;
}
}
[/php]
This uses a trick that is easier to use than odd/even rows and faster! It displays one square, then pushes the array to the next position and displays the second square. If that square is empty, it ends the row.
Should work for you…