I have a table with images ('imgurl' , 'orientation') where orientation is vertical or horizontal.
I want to display images :
first horizontal first vertical second vertical second horizontal
I would usually do a
while($img2 = mysql_fetch_assoc($img))
{ ... }
But how can I change that to control first horizontal, then first vertical, then second vertical, then second horizontal,
thanks
CODE:
$img = mysql_query("select * from blogimage where blog_id = '".$blog2['blog_id']."' ");
while($img2 = mysql_fetch_assoc($img))
{ ?>
<tr><td colspan="2"><img src="blogimages/<? echo $img2['img_url']; ?>" /></td></tr>
<? } ?>
the mysql table blogimage has 'img_url' and 'orientation' (vertical or horizontal)